-
Notifications
You must be signed in to change notification settings - Fork 78
/
lex_chain_lesseq.mzn
33 lines (28 loc) · 1.01 KB
/
lex_chain_lesseq.mzn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
include "lex_chain_lesseq_bool.mzn";
include "lex_chain_lesseq_int.mzn";
/** @group globals.lexicographic
Requires that the columns of matrix \a a are lexicographically sorted,
non-decreasing.
*/
predicate lex_chain_lesseq(array[int, int] of var bool: a) =
if 1>=card(index_set_2of2(a)) then true
else lex_chain_lesseq_bool(a) endif;
/** @group globals.lexicographic
Requires that the columns of matrix \a a are lexicographically sorted,
non-decreasing.
*/
predicate lex_chain_lesseq(array[int, int] of var int: a) =
if 1>=card(index_set_2of2(a)) then true
else lex_chain_lesseq_int(a) endif;
/** @group globals.lexicographic
Requires that the columns of matrix \a a are lexicographically sorted,
non-decreasing.
*/
predicate lex_chain(array[int, int] of var bool: a) =
lex_chain_lesseq(a);
/** @group globals.lexicographic
Requires that the columns of matrix \a a are lexicographically sorted,
non-decreasing.
*/
predicate lex_chain(array[int, int] of var int: a) =
lex_chain_lesseq(a);