dynetworkx.SnapshotGraph.to_directed

SnapshotGraph.to_directed(sbunch=None)

Returns a list of networkx directed 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 directed graphs. It is highly recommended that this list is sequential, however it can be out of order.
Returns:direct_list – List of networkx directed 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.digraph.DiGraph object at 0x7f1a6de49dd8>, <networkx.classes.digraph.DiGraph object at 0x7f1a6de49e10>]