Module type MultiGraph.G
module type G =Signature specifying the common interface to all multi-graph implementations.sig..end
Multi-Graph Structure
include Print.PRINTABLE_TYPE
 The printable type of multi-graphs.
module Vertex:sig..end
 Module to manage vertices.
module Edge:sig..end
 Module to manage edges.
Size Functions
val nb_vertices : t -> intnb_vertices g returns the number of vertices in the multi-graph g.val nb_edges : t -> intnb_edges g returns the number of edges in the multi-graph g.Membership Functions
val mem_vertex : t -> Vertex.t -> boolmem_vertex g v tests whether the multi-graph g contains the vertex v.val mem_edge : t -> Edge.t -> boolmem_edge g e tests whether the multi-graph g contains the edge e.Iterators
The following iterators apply a given function
f to some vertices (resp.
 to some edges) of a given multi-graph.  Each vertex (resp. each edge) is
 passed at most once to the function f.  The order in which the vertices
 (resp. the edges) are passed to f is unspecified.Global Iterators
val iter_vertices : (Vertex.t -> unit) -> t -> unititer_vertices f g applies f in turn to all vertices of g.val fold_vertices : (Vertex.t -> 'a -> 'a) -> t -> 'a -> 'afold_vertices f g a returns (f vN ... (f v2 (f v1 a))...), where v1,
 ..., vN are the vertices of g.val iter_edges : (Edge.t -> unit) -> t -> unititer_edges f g applies f in turn to all edges of g.val fold_edges : (Edge.t -> 'a -> 'a) -> t -> 'a -> 'afold_edges f g a returns (f eN ... (f e2 (f e1 a))...), where e1, ...,
 eN are the edges of g.Local Iterators
val iter_succ : (Edge.t -> unit) -> t -> Vertex.t -> unititer_succ f g v applies f in turn to all outbound edges of v in
 g (i.e. all edges in g with source E.src e equal to v).
 Precondition 
v is a vertex contained in g.val fold_succ : (Edge.t -> 'a -> 'a) -> t -> Vertex.t -> 'a -> 'afold_succ f g v a returns (f eN ... (f e2 (f e1 a))...), where e1,
 ..., eN are the outbound edges of v in g (i.e. the edges in g
 with source E.src e equal to v).
 Precondition 
v is a vertex contained in g.val iter_pred : (Edge.t -> unit) -> t -> Vertex.t -> unititer_pred f g v applies f in turn to all inbound edges of v in
 g (i.e. all edges in g with target E.tgt e equal to v).
 Precondition 
v is a vertex contained in g.val fold_pred : (Edge.t -> 'a -> 'a) -> t -> Vertex.t -> 'a -> 'afold_pred f g v a returns (f eN ... (f e2 (f e1 a))...), where e1,
 ..., eN are the inbound edges of v in g (i.e. the edges in g
 with target E.tgt e equal to v).
 Precondition 
v is a vertex contained in g.