Return shortest paths between all nodes.
Returns a dictionary with keys for all reachable node pairs.
Parameters: | G : NetworkX graph cutoff : integer, optional
|
---|
See also
Examples
>>> G=nx.path_graph(5)
>>> path=nx.all_pairs_shortest_path(G)
>>> print path[0][4]
[0, 1, 2, 3, 4]