Module Nonnegative

module Nonnegative: sig .. end
Weighted graphs without negative-cycles.


This graph maintains the invariant that it is free of such cycles that the total length of edges involving is negative. With introduction of those negative-cycles causes an inability to compute the shortest paths from arbitrary vertex. By using the graph modules defined here, introduction of such a cycle is automatically prevented.
module Imperative: 
functor (G : Sig.IM) ->
functor (W : Sig.WEIGHT with type edge = G.E.t) -> sig .. end
module Persistent: 
functor (G : Sig.P) ->
functor (W : Sig.WEIGHT with type edge = G.E.t) -> sig .. end
Persistent graphs with negative-cycle prevention