Module type MultiGraph.I


module type I = sig .. end
Interface for imperative implementations of labeled directed multi-graphs.

include MultiGraph.G
val create : int -> t
create n creates a new, empty multi-graph, with initial size n. For best results, n should be on the order of the expected number of vertices that will be in the multi-graph. The multi-graph grows as needed, so n is just an initial guess.
val add_vertex : t -> Vertex.t -> unit
add_vertex g v adds the vertex v to the multi-graph g.
Precondition v is not already contained in g.

val del_vertex : t -> Vertex.t -> unit
del_vertex g v removes the vertex v from the multi-graph g. All edges e with source E.src e or target E.tgt e equal to v are also removed from g.
Precondition v is contained in g.

val add_edge : t -> Edge.t -> unit
add_edge g e adds the edge e to the multi-graph g. The source E.src e and target E.tgt e vertices of e are also added to g if they are not already in g.
Precondition e is not already contained in g.

val del_edge : t -> Edge.t -> unit
del_edge g e removes the edge e from the multi-graph g.
Precondition e is contained in g.