Module Path.BellmanFord
Parameters
Signature
exceptionNegativeCycle of G.E.t list
val all_shortest_paths : G.t -> G.V.t -> W.t H.tshortest_path g vscomputes the distances of shortest paths from vertexvsto all other vertices in graphg. They are returned as a hash table mapping each vertex reachable fromvsto its distance fromvs. Ifgcontains a negative-length cycle reachable fromvs, raisesNegativeCycle lwherelis such a cycle.Complexity: at most O(VE)