Node:Membership Constraints, Next:, Previous:Arithmetic Constraints, Up:Available Constraints



Membership Constraints

domain(+Variables, +Min, +Max)

where Variables is a list of domain variables or integers, Min is an integer or the atom inf (minus infinity), and Max is an integer or the atom sup (plus infinity). True if the variables all are elements of the range Min..Max. Cannot be reified.

?X in +Range

defines a membership constraint. X is an integer or a domain variable and Range is a ConstantRange (see Syntax of Indexicals). True if X is an element of the range.

?X in_set +FDSet

defines a membership constraint. X is an integer or a domain variable and FDSet is an FD set term (see FD Set Operations). True if X is an element of the FD set.

in/2 and in_set/2 constraints can be reified. They maintain domain-consistency and their reified versions detect domain-entailment and -disentailment; see The Constraint System.