dynetx.DynGraph.add_interactions_from¶
- DynGraph.add_interactions_from(ebunch, t=None, e=None)¶
Add all the interaction in ebunch at time t.
Parameters¶
- ebunchcontainer 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
See Also¶
add_edge : add a single interaction
Examples¶
>>> import dynetx as dn >>> G = dn.DynGraph() >>> G.add_edges_from([(0,1),(1,2)], t=0)