Loading Floyd–Warshall algorithm