this repo has no description
1%-----------------------------------------------------------------------------%
2% Constrains the array of objects 'x' to be all different.
3%-----------------------------------------------------------------------------%
4
5predicate all_different_int(array[int] of var int: x) =
6 g12fd_int_all_different(x);
7
8%-----------------------------------------------------------------------------%
9
10% The implementation of the all_different constraint in the G12/FD solver.
11% This should not be called directly, instead the definition above should
12% be used.
13predicate g12fd_int_all_different(array[int] of var int: x);
14
15% G12/FD doesn't provide a reified all_different so we use the following
16% definition if g12fd_int_all_different is called from a reified context.
17%
18predicate g12fd_int_all_different_reif(array[int] of var int: x, var bool: r) =
19 r <-> forall(i,j in index_set(x) where i < j) ( x[i] != x[j] );
20
21%-----------------------------------------------------------------------------%