package zdd

  1. Overview
  2. Docs

Signature of upward-closed sets, represented as the set of their minimal elements

type elt
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 full : t

The full family

val above : elt list -> t

above [x1;... ; xn] is the family of the sets that include {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 upward closure of the family { s1 ∪ s2 | s1 ∈ t1, s2 ∈ t2 }. This is the same as inter s1 s2.

val meet : t -> t -> t

meet t1 t2 is the upward closure of the family { s1 ∩ s2 | s1 ∈ t1, s2 ∈ t2 }.

val minima : t -> elt list list

The minimal 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 minimal 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 minimal 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_minima : (elt list -> unit) -> t -> unit

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

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

Folder on the list of elements that represent the minimal 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.