Up

module Builder

: sig

Graph builders in order to persistent/imperative graphs sharing a same signature.

Common interface for graph builders

.

Note: the following functions always return graphs but this is meaningless for imperative implementations (the graph is modified in-place). This is just to provide a common interface.

#
module type S = sig
#
module G : Sig.G
#
val empty : unit -> G.t
#
val copy : G.t -> G.t
#
val add_vertex : G.t -> G.V.t -> G.t
#
val add_edge : G.t -> G.V.t -> G.V.t -> G.t
#
val add_edge_e : G.t -> G.E.t -> G.t
#
val remove_vertex : G.t -> G.V.t -> G.t
#
val remove_edge : G.t -> G.V.t -> G.V.t -> G.t
#
val remove_edge_e : G.t -> G.E.t -> G.t
end
#
module type INT = S with type G.V.label = int

Builders for the various graph implementations

#
module P : functor (G : Sig.P) -> S with module G = G

Persistent Graphs Builders.

#
module I : functor (G : Sig.I) -> S with module G = G

Imperative Graphs Builders.

end