Module AcyclicGraph.Make
Parameters
Signature
val add : ?rank:int -> Point.t -> t -> tAll points must be pre-declared through this function before they can be mentioned in the others. NB: use a large
rankto keep the node canonical
exceptionUndeclared of Point.t
val check_declared : t -> Point.Set.t -> unit- raises Undeclared
if one of the points is not present in the graph.
type 'a check_function= t -> 'a -> 'a -> bool
val check_eq : Point.t check_functionval check_leq : Point.t check_functionval check_lt : Point.t check_functionval enforce_eq : Point.t -> Point.t -> t -> tval enforce_leq : Point.t -> Point.t -> t -> tval enforce_lt : Point.t -> Point.t -> t -> tval constraints_of : t -> Point.Constraint.t * Point.Set.t listval constraints_for : kept:Point.Set.t -> t -> Point.Constraint.tval domain : t -> Point.Set.tval choose : (Point.t -> bool) -> t -> Point.t -> Point.t optionval sort : (int -> Point.t) -> Point.t list -> t -> tsort mk first gbuilds a totally ordered graph. The output graph should imply the input graph (and the implication will be strict most of the time), but is not necessarily minimal. The lowest points in the result are identified withfirst. Moreover, it adds levelsType.nto identify the points (not infirst) at level n. An artificial constraint (last first < mk (length first)) is added to ensure that they are not merged. Note: the result is unspecified if the input graph already containsmk nnodes.