dynetworkx.SnapshotGraph.order

SnapshotGraph.order(sbunch=None)

Returns order of each graph requested in ‘sbunch’.

Parameters:sbunch (container of snapshot indexes, optional (default= None)) – Each snapshot index in this list will be included in the returned list of node orders. It is highly recommended that this list is sequential, however it can be out of order.
Returns:snapshot_orders – A list of the orders of each snapshot.
Return type:list

Examples

>>> G = dnx.SnapshotGraph()
>>> G.add_snapshot([(1, 2), (1, 3)])
>>> G.add_snapshot([(1, 4), (1, 3)])
>>> G.order(sbunch=[1])
[3]
>>> G.order(sbunch=[0, 1])
[3, 3]