dynetx.DynDiGraph.size

DynDiGraph.size(t=None)

Return the number of edges at time t.

Parameters:t (snapshot id (default=None)) – If None will be returned the size of the flattened graph.
Returns:nedges – The number of edges
Return type:int

Examples

>>> G = dn.DynDinGraph()
>>> G.add_interaction(0,1, t=0)
>>> G.add_interaction(1,2, t=0)
>>> G.add_interaction(2,3, t=0)
>>> G.size(t=0)
3