Module Avl_kernel


module Avl_kernel: sig  end
Transitive reduction of a directed graph.

This module allows computing the transitive reduction of a directed graph. Given a acyclic graph G = (X, E), the transitive reduction of G is the smallest graph G' = (X, E') such that the transitive closure of G' is G.

Reference: A.V. Aho, M.R. Garey and J.D. Ullman (HP). The Transitive Reduction of a Directed Graph. SIAM Journal on Computing, 1(2), pp. 131-137, June 1972.




Case of acyclic graphs



This first implementation handles only acyclic graphs.

module type GRAPH_acyclic = sig  end
For this implementation, the client must provide an implementation of graph which fullfills the signature GRAPH_acyclic .
module Make_acyclic: functor (X : GRAPH_acyclic) -> sig  end


General case



type 'a scc
In the general case, nodes must provide an additional internal field of type 'a scc.

val scc : unit -> 'a scc
scc () returns a fresh value of type 'a scc
module type GRAPH = sig  end
The client must provide an implementation of graph which fullfills the signature GRAPH.
module Make: functor (X : GRAPH) -> sig  end