Imperative Undirected Graphs.
Edges may be labeled or not:
Vertices may be concrete or abstract:
- Unlabeled: there is no label on edges
- Labeled: you have to provide a label implementation as a functor
How to choose between concrete and abstract vertices for my graph
- Concrete: type of vertex labels and type of vertices are identified.
- Abstract: type of vertices is abstract (in particular it is not equal
to type of vertex labels
Usually, if you fall into one of the following cases, use abstract
In other cases, it is certainly easier to use concrete vertices.
- you cannot provide efficient comparison/hash functions for vertices; or
- you wish to get two different vertices with the same label.
with type V.t = V.t and type V.label = V.t and type E.t = V.t * V.t
and type E.label = unit
Imperative Unlabeled Graphs.
Abstract Imperative Unlabeled Graphs.
Imperative Labeled Graphs.
Abstract Imperative Labeled Graphs.