dynetworkx.SnapshotGraph.insert

SnapshotGraph.insert(graph, snap_len=None, num_in_seq=None)

Insert a graph into the snapshot graph, with options for inserting at a given index, with some snapshot length.

Parameters:
  • graph (networkx graph object) – A networkx graph to be inserted into snapshot graph.
  • snap_len (integer, optional (default= None)) – Length of the snapshot.
  • num_in_seq (integer, optional (default= None)) – Time slot to begin insertion at.
Returns:

Return type:

None

Examples

>>> nxG1 = nx.Graph()
>>> nxG1.add_edges_from([(1, 2), (1, 3)])
>>> G = dnx.SnapshotGraph()
>>> G.insert(nxG1, 0)