[ library(tentative_constraints) | Reference Manual | Alphabetic Index ]

alldifferent_t(+Cs, +MC)

Tentative value implementation of alldifferent constraint
Cs
A list or array of variables/values
MC
A monitored_constraint descriptor

Description

Tentative value implementation of alldifferent constraint.

The violatedness of the constraint is the number of identical value pairs among its arguments.

The following declaration is in effect, meaning that alldifferent_t/2 is used whenever alldifferent/1 is added to a constraint set:

	:- alldifferent_t/2 tent_implements alldiffernet/1.
	

Modes and Determinism

Examples

    ?- Xs = [A,B,C], Xs tent_set [1,2,3], CS :~ alldifferent(Xs).
    Xs = [A{1 -> 0}, B{2 -> 0}, C{3 -> 0}]
    CS = constraint_set(TotalVio{0 -> 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)
    

See Also

alldifferent_t / 3, neq_t / 3, tentative : tent_implements / 2