Floyd Warshall working for directed graphs. TODO: fix undirected case.