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

<ConsistencyModule:> alldifferent(+Vars)

All elements of Vars are different.
Vars
A collection (a la collection_to_list/2) of variables or integers

Description

Constrains all elements of a collection to be different from each other. Semantically, all elements of the collection are pairwise different.

This constraint is also known as alldifferent_cst in the global constraints catalog, and is implemented using Gecode's distinct() constraint.

ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_vc for value consistency (naive), gfd_bc for bounds consistency, and gfd_gac for domain (generalised arc) consistency.

See Also

alldifferent_cst / 2, ic : alldifferent / 1, ic_symbolic : alldifferent / 1, sd : alldifferent / 1, fd_global : alldifferent / 1, ic_global : alldifferent / 1, fd : alldifferent / 1, fd_global_gac : alldifferent / 1, ic_global_gac : alldifferent / 1, lists : collection_to_list / 2