Functor providing topological iterators over a graph.
val fold :
(G.V.t -> 'a -> 'a) -> Topological.G.t -> 'a -> 'a
fold action g seed
allows iterating over the graph
in topological order.
action node accu
is called repeatedly,
is the node being visited, and
is the result of
's previous invocation, if any, and
contains cycles, the order is unspecified inside the cycles and
every node in the cycles will be presented exactly once.
Not tail-recursive. Complexity: O(V+E)
val iter :
(G.V.t -> unit) -> Topological.G.t -> unit
iter action calls
action node repeatedly. Nodes are (again)
action in topological order.
The order is the same as for