Functor Avl_topo.Make


module Make: functor (X : GRAPH) -> sig  end
Parameters:
X : Avl_topo.GRAPH

exception Cyclic
When applied on a graph containing a cycle, functions of this module raise the exception Cyclic.
val fold : (X.node -> 'a -> 'a) -> 'a -> X.graph -> 'a
fold f accu g performs a topological sort of the graph g. The result is f xn (f ... (f x2 (f x1 accu))) where x1, ..., xn is an acceptable ordering of the nodes.
val iter : (X.node -> unit) -> X.graph -> unit
iter f g applies f on every node of the graph g, in an order compatible with topological sort.
val list : X.graph -> X.node list
list g returns the list of nodes of g ordered topologically.
val stack : X.graph -> X.node Stack.t
stack g returns a stack containing the nodes of g ordered topologically.
val queue : X.graph -> X.node Queue.t
queue g returns a queue containing the nodes of g ordered topologically.