The Floyd-Warshall algorithm for all pairs shortest paths.
| Parameters: | G : NetworkX graph |
|---|---|
| Returns: | distance,pred : dictionaries
|
Notes
This algorithm is most appropriate for dense graphs. The running time is O(n^3), and running space is O(n^2) where n is the number of nodes in G.