Skip to content

Commit 0cea598

Browse files
committed
Compress propagation levels
1 parent 9b0c510 commit 0cea598

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

gecode/int.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,8 @@ namespace Gecode {
980980
/// Options: basic versus advanced propagation
981981
IPL_BASIC = 4, ///< Use basic propagation algorithm
982982
IPL_ADVANCED = 8, ///< Use advanced propagation algorithm
983-
IPL_BASIC_ADVANCED = IPL_BASIC | IPL_ADVANCED ///< Use both
983+
IPL_BASIC_ADVANCED = IPL_BASIC | IPL_ADVANCED, ///< Use both
984+
_IPL_BITS = 4 ///< Number of bits required (internal)
984985
};
985986

986987
/// Extract value, bounds, or domain propagation from propagation level

gecode/minimodel.hh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,22 @@ namespace Gecode {
100100
/// Class for specifying integer propagation levels used by minimodel
101101
class IntPropLevels {
102102
protected:
103-
IntPropLevel _linear2; ///< For binary linear
104-
IntPropLevel _linear; ///< For n-ary linear
105-
IntPropLevel _abs; ///< For absolute value
106-
IntPropLevel _max2; ///< For binary maximum
107-
IntPropLevel _max; ///< For n-ary maximum
108-
IntPropLevel _min2; ///< For binary minimum
109-
IntPropLevel _min; ///< For minimum
110-
IntPropLevel _mult; ///< For multiplication
111-
IntPropLevel _div; ///< For division
112-
IntPropLevel _mod; ///< For modulo
113-
IntPropLevel _sqr; ///< For square
114-
IntPropLevel _sqrt; ///< For square root
115-
IntPropLevel _pow; ///< For power
116-
IntPropLevel _nroot; ///< For root
117-
IntPropLevel _element; ///< For element
118-
IntPropLevel _ite; ///< For if-then-else
103+
IntPropLevel _linear2 : _IPL_BITS; ///< For binary linear
104+
IntPropLevel _linear : _IPL_BITS; ///< For n-ary linear
105+
IntPropLevel _abs : _IPL_BITS; ///< For absolute value
106+
IntPropLevel _max2 : _IPL_BITS; ///< For binary maximum
107+
IntPropLevel _max : _IPL_BITS; ///< For n-ary maximum
108+
IntPropLevel _min2 : _IPL_BITS; ///< For binary minimum
109+
IntPropLevel _min : _IPL_BITS; ///< For minimum
110+
IntPropLevel _mult : _IPL_BITS; ///< For multiplication
111+
IntPropLevel _div : _IPL_BITS; ///< For division
112+
IntPropLevel _mod : _IPL_BITS; ///< For modulo
113+
IntPropLevel _sqr : _IPL_BITS; ///< For square
114+
IntPropLevel _sqrt : _IPL_BITS; ///< For square root
115+
IntPropLevel _pow : _IPL_BITS; ///< For power
116+
IntPropLevel _nroot : _IPL_BITS; ///< For root
117+
IntPropLevel _element : _IPL_BITS; ///< For element
118+
IntPropLevel _ite : _IPL_BITS; ///< For if-then-else
119119
public:
120120
/// Initialize with default propagation level
121121
IntPropLevels(IntPropLevel ipl=IPL_DEF);

0 commit comments

Comments
 (0)