dynetx.DynDiGraph.temporal_snapshots_ids

DynDiGraph.temporal_snapshots_ids()

Return the ordered list of snapshot ids present in the dynamic graph.

Returns:nd – a list of snapshot ids
Return type:list

Examples

>>> import dynetx as dn
>>> G = dn.DynDiGraph()
>>> G.add_interaction(0,1, t=0)
>>> G.add_interaction(1,2, t=0)
>>> G.add_interaction(2,3, t=0)
>>> G.add_interaction(0,4, t=1)
>>> G.add_interaction(4,5, t=1)
>>> G.add_interaction(5,6, t=1)
>>> G.add_interaction(7,1, t=2)
>>> G.add_interaction(1,2, t=2)
>>> G.add_interaction(2,3, t=2)
>>> G.temporal_snapshots_ids()
[0, 1, 2]