[ library(ic) | Reference Manual | Alphabetic Index ]
alldifferent_cst(+Vars, ++Offsets)
The values of each element plus corresponding offset are pair-wise different.
- Vars
- A collection (a la collection_to_list/2) of variables or integers
- Offsets
- A collection (a la collection_to_list/2) of integers, with the same cardinality as Vars.
Description
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, eclipse_6 : collection_to_list / 2, lists : collection_to_list / 2