package zelus

  1. Overview
  2. Docs
type index = int
module S : sig ... end
module E : sig ... end
type 'a graph = {
  1. outputs : S.t;
  2. succ : S.t E.t;
  3. prec : S.t E.t;
  4. containt : 'a E.t;
  5. nodes : S.t;
}
type error =
  1. | Cycle of index list
exception Error of error
val empty : 'a graph
val add : E.key -> 'a -> 'b graph -> 'c graph
val add_before : S.t -> S.t -> 'a graph -> 'b graph
val is_before : 'a graph -> E.key -> S.elt -> bool
val successors : E.key -> 'a graph -> S.t
val containt : E.key -> 'a graph -> 'b
val outputs : 'a graph -> 'b graph
val acyclic : 'a graph -> unit

Well formation of a graph

val transitive_reduction : 'a graph -> 'b graph

transitive reduction for an acyclic graph

val topological : 'a graph -> 'b list
val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'b graph -> unit

Print