Module Prim.Make

Functor providing an implementation of Prim's minimum-spanning-tree algorithm. Parameter W ensures that label on edges are comparable.

Parameters

module G : G
module W : Sig.WEIGHT with type edge = G.E.t

Signature

val spanningtree : G.t -> G.E.t list
val spanningtree_from : G.t -> G.V.t -> G.E.t list