DynDiGraph.add_interactions_from(ebunch, t=None, e=None)

Add all the interaction in ebunch at time t.

  • ebunch (container of interaction) – Each interaction given in the container will be added to the graph. The interaction must be given as as 2-tuples (u,v) or 3-tuples (u,v,d) where d is a dictionary containing interaction data.
  • t (appearance snapshot id, mandatory) –
  • e (vanishing snapshot id, optional) –


>>> import dynetx as dn
>>> G = dn.DynDiGraph()
>>> G.add_interactions_from([(0,1),(1,2)], t=0)