Module type Avl_kernel.GRAPH_acyclic

module type GRAPH_acyclic = sig  end
For this implementation, the client must provide an implementation of graph which fullfills the signature GRAPH_acyclic .

type graph
The type of graphs.

type node
The type of nodes.

val iter_nodes : (node -> unit) ->
graph -> unit
iter_nodes f g applies f on every nodes of the graph g. The order in which nodes are considered does not matter. However, each node must be considered exactly once.
val iter_successors : (node -> unit) ->
node -> unit
iter_successors f nd applies f on every successors of the node nd in its graph. The order in which successors are considere does not matter. Multiple occurences of the same successor are allowed.
val get : node -> int
Every node must carry a transient integer field. No assumption is made about the initial content. The following functions allows reading and updating this field.
val set : node -> int -> unit