[ library(tentative_constraints) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

alldifferent_t(+Xs, +Cs, +MC)

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

Description

Tentative value implementation of alldifferent constraint with offsets. The difference releationship must hold between the values resulting from adding each variable Xi to its corresponding offset Ci.

The violatedness of the constraint is the number of identical value pairs among these Xi+Ci values.

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

	:- alldifferent_t/3 tent_implements alldiffernet/2.
	

Modes and Determinism

Examples

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

See Also

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