sig type edge type t val weight : edge -> t val compare : t -> t -> int val add : t -> t -> t val zero : t val sub : t -> t -> t end