package zdd

  1. Overview
  2. Docs

Functor that creates a structure of downward closed sets

Parameters

module X : T

Signature

type elt = X.t
type t
val hash : t -> int

Hash function

val compare : t -> t -> int

Total order

val equal : t -> t -> bool

Equality test

val pp : Format.formatter -> t -> unit

Pretty-printer

val empty : t

The empty family

val base : t

The family { ∅ }

val below : elt list -> t

below [x1;... ; xn] is the family of the sets that are included in {x1,..., xn}.

val subset : t -> t -> bool

Inclusion test

val union : t -> t -> t

Union of set families

val inter : t -> t -> t

Intersection of set families

val join : t -> t -> t

join t1 t2 is the downward closure of the family { s1 ∪ s2 | s1 ∈ t1, s2 ∈ t2 }.

val meet : t -> t -> t

meet t1 t2 is the downward closure of the family { s1 ∩ s2 | s1 ∈ t1, s2 ∈ t2 }. This is the same as inter s1 s2.

val maxima : t -> elt list list

The maximal elements of a family

val subst : (elt -> t option) -> t -> t

Substitution

val iter_elt : (elt -> unit) -> t -> unit

Iterator on the elements that occur in the maximal elements of the set family. The elements might be encountered more than once, and the order in which they are encountered is unspecified.

val fold_elt : (elt -> 'a -> 'a) -> t -> 'a -> 'a

Folder on the elements that occur in the maximal elements of the set family. The elements might be encountered more than once, and the order in which they are encountered is unspecified.

val iter_maxima : (elt list -> unit) -> t -> unit

Iterator on the list of elements that represent the maximal sets in the families. The sets may occur in an unspecified order. The elements in the lists occur in increasing order.

val fold_maxima : (elt list -> 'a -> 'a) -> t -> 'a -> 'a

Folder on the list of elements that represent the maximal sets in the families. The sets may occur in an unspecified order. The elements in the lists occur in increasing order.

OCaml

Innovation. Community. Security.