public static < N , E > APSPResult < N , E > findAPSP ( Graph < N , E > graph , EdgeWeights < E > edgeWeights ) { return FloydWarshallAPSP . findAPSP ( graph , edgeWeights ) ; }
Computes the shortest paths between all pairs of nodes in a graph using the Floyd - Warshall dynamic programming algorithm . Note that the result is only correct if the graph contains no cycles with negative edge weight sums .