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

alldifferent_cst(+Vars, ++Offsets)

The values of each element plus corresponding offset are pair-wise different.
A collection (a la collection_to_list/2) of variables or integers
A collection (a la collection_to_list/2) of integers, with the same cardinality as Vars.


Constrains all elements of Vars plus their corresponding offset value in Offset to be different. That is,

        Vari + Offseti #\= Varj + Offsetj  % if i \= j
where Vari, Offseti are the i'th element of Vars and Offsets, and Varj, Offsetj are the j'th element.

See Also

alldifferent / 1, lists : collection_to_list / 2