dynetworkx.SnapshotGraph.to_undirected

SnapshotGraph.to_undirected(sbunch=None)

Returns a list of networkx graph objects.

Parameters:sbunch (container of snapshot indexes, optional (default= None)) – Each snapshot index in this list will be included in the returned list of undirected graphs. It is highly recommended that this list is sequential, however it can be out of order.
Returns:undirect_list – List of networkx graph objects.
Return type:list

Examples

>>> G = dnx.SnapshotGraph()
>>> G.add_snapshot([(1, 2), (1, 3)])
>>> G.add_snapshot([(1, 4), (1, 3)])
>>> G.to_directed(sbunch=[0, 1])
[<networkx.classes.graph.Graph object at 0x7ff532219e10>, <networkx.classes.graph.Graph object at 0x7ff532219e48>]