Graph.PathPaths
module type G = sig ... endMinimal graph signature for Dijkstra's algorithm. Sub-signature of Sig.G.
module BellmanFord
(G : G)
(W : Sig.WEIGHT with type edge = G.E.t) :
sig ... endmodule type WJ = sig ... endWeight signature for Johnson's algorithm.
0-1 BFS
When edge weights are limited to 0 or 1, this is more efficient than running Dijkstra's algorithm. It runs in time and space O(E) in the worst case.