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 -> 'a graph -> 'a graph
val add_before : S.t -> S.t -> 'a graph -> 'a 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 -> 'a
val outputs : 'a graph -> 'a graph
val acyclic : 'a graph -> unit

Well formation of a graph

val transitive_reduction : 'a graph -> 'a graph

transitive reduction for an acyclic graph

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

Print

OCaml

Innovation. Community. Security.