# package ocamlgraph

## Install

## Dune Dependency

## Authors

## Maintainers

## Sources

`sha256=0f962c36f9253df2393955af41b074b6a426b2f92a9def795b2005b57d302d65`

`sha512=8ee77bc1ef27bef41171b5718a73342dca8adc4b4592ff835038cd21e8c91152a0f9500b4034f664d1db7a09dab1efcc3be5d7c59260d6b33710b82a1fb2f196`

## README.md.html

## OCamlgraph

OCamlgraph is a graph library for OCaml. Its contribution is three-fold:

It provides an easy-to-use graph implementation together with several operations and algorithms over graphs, in Graph.Pack.Digraph. It is a reasonably efficient imperative data structure for directed graphs with vertices and edges labeled with integers.

Have a look at this module first in order to get an overview of what this library provides. See also

`demo.ml`

.Then OCamlgraph provides several other graph implementations for those not satisfied with the one above. Some are persistent (immutable) and other imperative (mutable). Some are directed and other are not. Some have labels for vertices, or labels for edges, or both. Some have abstract types for vertices. etc.

See interface Sig for the graph signatures and modules Persistent and Imperative for the implementations.

These implementations are written as functors: you give the types of vertices labels, edge labels, etc. and you get the data structure as a result.

Finally, OCamlgraph provides several classic operations and algorithms over graphs. They are also written as functors i.e. independently of the data structure for graphs. One consequence is that you can define your own data structure for graphs and yet re-use all the algorithms from this library -- you only need to provide a few operations such as iterating over all vertices, over the successors of a vertex, etc.

### Documentation

https://backtracking.github.io/ocamlgraph/

### Examples

You'll find examples of OCamlgraph use in subdirectory examples/ (demo.ml, demo_planar.ml, color.ml, etc.).

### Bug reports

https://github.com/backtracking/ocamlgraph/issues