4.2.2.3. Sorting constraints
In this section: arg_sort, decreasing, increasing, sort, strictly_decreasing, strictly_increasing.
arg_sort
1. predicate arg_sort(array [$$E] of var int: x,
array [int] of var $$E: p)
2. predicate arg_sort(array [$$E] of var float: x,
array [int] of var $$E: p)
3. function array [int] of var $$E: arg_sort(array [$$E] of var int: x)
4. function array [int] of var $$E: arg_sort(array [$$E] of var float: x)
|
|
decreasing
predicate decreasing(array [$X] of var bool: x)
predicate decreasing(array [$X] of var opt float: x)
predicate decreasing(array [$X] of var opt int: x)
predicate decreasing(array [$X] of var set of int: x)
|
Requires that the array x is in decreasing order (duplicates are allowed). |
increasing
predicate increasing(array [$X] of var bool: x)
predicate increasing(array [$X] of var float: x)
predicate increasing(array [$X] of var opt float: x)
predicate increasing(array [$X] of var int: x)
predicate increasing(array [$X] of var opt int: x)
predicate increasing(array [$X] of var set of int: x)
|
Requires that the array x is in increasing order (duplicates are allowed). |
sort
1. predicate sort(array [int] of var int: x, array [int] of var int: y)
2. function array [int] of var int: sort(array [int] of var int: x)
|
|
strictly_decreasing
predicate strictly_decreasing(array [$X] of var opt int: x)
predicate strictly_decreasing(array [$X] of var opt float: x)
predicate strictly_decreasing(array [$X] of var set of int: x)
|
Requires that the array x is in a stricly decreasing order (duplicates are not allowed). |
strictly_increasing
1. predicate strictly_increasing(array [$X] of var int: x)
2. predicate strictly_increasing(array [$X] of var opt int: x)
3. predicate strictly_increasing(array [$X] of var float: x)
4. predicate strictly_increasing(array [$X] of var opt float: x)
5. predicate strictly_increasing(array [$X] of var set of int: x)
|
|