DynDiGraph.add_interaction(u, v, t=None, e=None)

Add an interaction between u and v at time t vanishing (optional) at time e.

The nodes u and v will be automatically added if they are not already in the graph.

Parameters: v (u,) – Nodes can be, for example, strings or numbers. Nodes must be hashable (and not None) Python objects. t (appearance snapshot id, mandatory) – e (vanishing snapshot id, optional (default=None)) –

add_edges_from()
add a collection of interaction at time t

Notes

Examples

The following all add the interaction e=(1,2, 0) to graph G:

>>> import dynetx as dn
>>> G = dn.DynDiGraph()