Implementation notes
The implementation of Floyd-Warshall is relatively straightforward compared to Dijkstra’s algorithm. We’ll construct the matrices A0,P0 from the weighted adjacency list and then iteratively compute the distance and predecessor matrices Ak,Pk, for k=1,…,∣V∣.
One important observation to reduce the memory footprint of the algorithm is that the computation of ...