module Make_acyclic: functor (X : GRAPH_acyclic) -> sig end
Parameters: |
|
exception Cyclic
val fold : 'a -> (X.node -> X.node -> 'a -> 'a) -> X.graph -> 'a
fold g
computes the transitive reduction of the graph
g
. The graph g
is supposed to be acyclic, otherwise the
exception Cyclic
is raised. The function returns the set of edges
of the resulting graph. This set is computed thanks to parameters
empty
and add
:empty
is the empty initial set,add nd1 nd2 s
returns the set obtained by adding the edge
nd1 -> nd2
to the set s
.