Module Path.Dijkstra
Parameters
Signature
val shortest_path : G.t -> G.V.t -> G.V.t -> G.E.t list * W.t
shortest_path g v1 v2
computes the shortest path from vertexv1
to vertexv2
in graphg
. The path is returned as the list of followed edges, together with the total length of the path. raiseNot_found
if the path fromv1
tov2
does not exist.Complexity: at most O((V+E)log(V))