Module Conjunto

module Conjunto: sig .. end
Constraints on Finite Sets

val subset : Var.SetFd.t -> Var.SetFd.t -> Cstr.t
subset v1 v2 ensures that v1 is a subset of v2. Not reifiable.
val cardinal : Var.SetFd.t -> Var.Fd.t
cardinal v returns the cardinal (an integer variable) of the set v. Not reifiable.
val smallest : Var.SetFd.t -> Var.Fd.t
smallest v returns the smallest element (an integer variable) of v.
val union : Var.SetFd.t -> Var.SetFd.t -> Var.SetFd.t
val inter : Var.SetFd.t -> Var.SetFd.t -> Var.SetFd.t
Operations on sets.
val all_disjoint : Var.SetFd.t array -> Cstr.t
all_disjoint vars ensures that all the set variables of array vars are pairwise disjoint. Not reifiable.
val disjoint : Var.SetFd.t -> Var.SetFd.t -> Cstr.t
disjoint v1 v2 defined by all_disjoint [|v1; v2|]. Not reifiable.
val inside : int -> Var.SetFd.t -> unit
val outside : int -> Var.SetFd.t -> unit
Basic refinements for labeling.
val mem : Var.Fd.t -> Var.SetFd.t -> Cstr.t
mem x v states that x belongs to v.
val inf_min : Var.SetFd.t -> Var.SetFd.t -> Cstr.t
inf_min v1 v2 ensures that the minimal element of v1 is less than or equal to the minimal element of v2. The empty set is smaller than any other set. Useful to break permutation symmetries for a set of set variables. Not reifiable.
val order : Var.SetFd.t -> Var.SetFd.t -> Cstr.t
order v1 v2 ensures that v1 is less than or equal to v2 according to . Caution: order builds the cardinal variables of v1 and v2; if they are already available, please use order_with_card. Not reifiable.
val order_with_card : Var.SetFd.t -> Var.Fd.t -> Var.SetFd.t -> Var.Fd.t -> Cstr.t
order_with_card v1 card1 v2 card2 is equivalent to order but the cardinals of the variables must be provided too. Useful to sort a set of variables.
val member : Var.SetFd.t -> SetDomain.elt list -> Cstr.t
member v l ensures that v will have a value in l. Not reifiable.
val sum_weight : Var.SetFd.t -> (int * int) list -> Var.Fd.t
sum_weight v weights returns an integer variable equal to the sum of the weights associated with the value in v. weights must be a list of pairs value, weight) that associates a unique weight to each value possibly in v. All the weights must be positive integers.