Module floyd_warshall

Module floyd_warshall 

Source
Expand description

Floyd-Warshall all-pairs shortest path.

Functionsยง

floyd_warshall
Runs the Floyd-Warshall all-pairs shortest-path algorithm.
floyd_warshall_with_paths
Returns the shortest path (as a sequence of NodeIds) between two nodes using a pre-computed Floyd-Warshall distance matrix and next-hop table.
reconstruct_fw_path
Reconstructs a shortest path using the next table from floyd_warshall_with_paths.