From 0cea598930a2f3b9f3ba6209c5e426d043f3b1b1 Mon Sep 17 00:00:00 2001 From: Christian Schulte Date: Wed, 5 Dec 2018 12:44:38 +0100 Subject: [PATCH] Compress propagation levels --- gecode/int.hh | 3 ++- gecode/minimodel.hh | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/gecode/int.hh b/gecode/int.hh index 40905c5af0..715aac0efe 100755 --- a/gecode/int.hh +++ b/gecode/int.hh @@ -980,7 +980,8 @@ namespace Gecode { /// Options: basic versus advanced propagation IPL_BASIC = 4, ///< Use basic propagation algorithm IPL_ADVANCED = 8, ///< Use advanced propagation algorithm - IPL_BASIC_ADVANCED = IPL_BASIC | IPL_ADVANCED ///< Use both + IPL_BASIC_ADVANCED = IPL_BASIC | IPL_ADVANCED, ///< Use both + _IPL_BITS = 4 ///< Number of bits required (internal) }; /// Extract value, bounds, or domain propagation from propagation level diff --git a/gecode/minimodel.hh b/gecode/minimodel.hh index 86467d2ade..5017d646ff 100755 --- a/gecode/minimodel.hh +++ b/gecode/minimodel.hh @@ -100,22 +100,22 @@ namespace Gecode { /// Class for specifying integer propagation levels used by minimodel class IntPropLevels { protected: - IntPropLevel _linear2; ///< For binary linear - IntPropLevel _linear; ///< For n-ary linear - IntPropLevel _abs; ///< For absolute value - IntPropLevel _max2; ///< For binary maximum - IntPropLevel _max; ///< For n-ary maximum - IntPropLevel _min2; ///< For binary minimum - IntPropLevel _min; ///< For minimum - IntPropLevel _mult; ///< For multiplication - IntPropLevel _div; ///< For division - IntPropLevel _mod; ///< For modulo - IntPropLevel _sqr; ///< For square - IntPropLevel _sqrt; ///< For square root - IntPropLevel _pow; ///< For power - IntPropLevel _nroot; ///< For root - IntPropLevel _element; ///< For element - IntPropLevel _ite; ///< For if-then-else + IntPropLevel _linear2 : _IPL_BITS; ///< For binary linear + IntPropLevel _linear : _IPL_BITS; ///< For n-ary linear + IntPropLevel _abs : _IPL_BITS; ///< For absolute value + IntPropLevel _max2 : _IPL_BITS; ///< For binary maximum + IntPropLevel _max : _IPL_BITS; ///< For n-ary maximum + IntPropLevel _min2 : _IPL_BITS; ///< For binary minimum + IntPropLevel _min : _IPL_BITS; ///< For minimum + IntPropLevel _mult : _IPL_BITS; ///< For multiplication + IntPropLevel _div : _IPL_BITS; ///< For division + IntPropLevel _mod : _IPL_BITS; ///< For modulo + IntPropLevel _sqr : _IPL_BITS; ///< For square + IntPropLevel _sqrt : _IPL_BITS; ///< For square root + IntPropLevel _pow : _IPL_BITS; ///< For power + IntPropLevel _nroot : _IPL_BITS; ///< For root + IntPropLevel _element : _IPL_BITS; ///< For element + IntPropLevel _ite : _IPL_BITS; ///< For if-then-else public: /// Initialize with default propagation level IntPropLevels(IntPropLevel ipl=IPL_DEF);