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) –
- add a single interaction
>>> import dynetx as dn >>> G = dn.DynGraph() >>> G.add_edges_from([(0,1),(1,2)], t=0)