Go to the documentation of this file.
46 #ifndef __GECODE_INT_HH__
47 #define __GECODE_INT_HH__
54 #include <unordered_map>
57 #include <initializer_list>
67 #if !defined(GECODE_STATIC_LIBS) && \
68 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
70 #ifdef GECODE_BUILD_INT
71 #define GECODE_INT_EXPORT __declspec( dllexport )
73 #define GECODE_INT_EXPORT __declspec( dllimport )
78 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
79 #define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
81 #define GECODE_INT_EXPORT
87 #ifndef GECODE_BUILD_INT
88 #define GECODE_LIBRARY_NAME "Int"
105 namespace Gecode {
namespace Int {
116 const int max = INT_MAX - 1;
122 const long long int llmax = LLONG_MAX - 1;
130 bool valid(
long long int n);
132 void check(
int n,
const char*
l);
134 void check(
long long int n,
const char*
l);
138 void positive(
long long int n,
const char*
l);
165 template<
class I>
class IntSetInit;
221 explicit IntSet(
const int r[],
int n);
227 explicit IntSet(
const int r[][2],
int n);
236 explicit IntSet(std::initializer_list<int>
r);
243 explicit IntSet(std::initializer_list<std::pair<int,int>>
r);
251 int min(
int i)
const;
253 int max(
int i)
const;
255 unsigned int width(
int i)
const;
260 bool in(
int n)
const;
263 unsigned int size(
void)
const;
265 unsigned int width(
void)
const;
295 const IntSet::Range* i;
297 const IntSet::Range* e;
324 unsigned int width(
void)
const;
350 template<
class Char,
class Traits>
351 std::basic_ostream<Char,Traits>&
443 unsigned int size(
void)
const;
445 unsigned int width(
void)
const;
454 bool range(
void)
const;
457 bool in(
int n)
const;
465 template<
class Char,
class Traits>
466 std::basic_ostream<Char,Traits>&
565 unsigned int size(
void)
const;
567 unsigned int width(
void)
const;
576 bool range(
void)
const;
579 bool in(
int n)
const;
584 bool zero(
void)
const;
587 bool one(
void)
const;
589 bool none(
void)
const;
597 template<
class Char,
class Traits>
598 std::basic_ostream<Char,Traits>&
641 IntArgs(std::initializer_list<int>
x);
643 template<
class InputIterator>
644 IntArgs(InputIterator first, InputIterator last);
673 template<
class InputIterator>
674 IntVarArgs(InputIterator first, InputIterator last);
729 template<
class InputIterator>
730 BoolVarArgs(InputIterator first, InputIterator last);
1744 sorted(Home home,
const IntVarArgs&
x,
const IntVarArgs&
y,
1759 sorted(Home home,
const IntVarArgs&
x,
const IntVarArgs&
y,
1760 const IntVarArgs&
z,
1862 count(Home home,
const IntVarArgs&
x,
const IntVarArgs&
c,
1899 count(Home home,
const IntVarArgs&
x,
1900 const IntVarArgs&
c,
const IntArgs&
v,
1920 count(Home home,
const IntVarArgs&
x,
1941 count(Home home,
const IntVarArgs&
x,
1942 const IntSet&
c,
const IntArgs&
v,
2005 sequence(Home home,
const IntVarArgs&
x,
const IntSet& s,
2023 sequence(Home home,
const BoolVarArgs&
x,
const IntSet& s,
2066 Transition(
int i_state0,
int symbol0,
int o_state0);
2106 int val(
void)
const;
2148 DFA(
int s, std::initializer_list<Transition>
t,
2149 std::initializer_list<int>
f,
bool minimize=
true);
2174 std::size_t
hash(
void)
const;
2210 unsigned int width(
void)
const;
2223 unsigned int start(
int n)
const;
2232 static const int n_initial_free = 1024;
2266 unsigned int tuple2idx(
Tuple t)
const;
2283 virtual ~
Data(
void);
2317 operator bool(
void)
const;
2336 int arity(
void)
const;
2341 unsigned int words(
void)
const;
2345 int min(
void)
const;
2347 int max(
void)
const;
2349 std::size_t
hash(
void)
const;
2382 int min(
void)
const;
2385 int max(
void)
const;
2387 unsigned int width(
void)
const;
2442 extensional(Home home,
const IntVarArgs&
x,
const TupleSet&
t,
2472 extensional(Home home,
const IntVarArgs&
x,
const TupleSet&
t, Reify
r,
2503 extensional(Home home,
const BoolVarArgs&
x,
const TupleSet&
t,
2533 extensional(Home home,
const BoolVarArgs&
x,
const TupleSet&
t, Reify
r,
2571 min(Home home, IntVar x0, IntVar x1, IntVar x2,
2581 min(Home home,
const IntVarArgs&
x, IntVar
y,
2589 max(Home home, IntVar x0, IntVar x1, IntVar x2,
2599 max(Home home,
const IntVarArgs&
x, IntVar
y,
2624 argmin(Home home,
const IntVarArgs&
x,
int o, IntVar
y,
bool tiebreak=
true,
2648 argmax(Home home,
const IntVarArgs&
x,
int o, IntVar
y,
bool tiebreak=
true,
2672 argmin(Home home,
const BoolVarArgs&
x,
int o, IntVar
y,
bool tiebreak=
true,
2696 argmax(Home home,
const BoolVarArgs&
x,
int o, IntVar
y,
bool tiebreak=
true,
2705 abs(Home home, IntVar x0, IntVar x1,
2714 mult(Home home, IntVar x0, IntVar x1, IntVar x2,
2722 divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
2730 div(Home home, IntVar x0, IntVar x1, IntVar x2,
2738 mod(Home home, IntVar x0, IntVar x1, IntVar x2,
2747 sqr(Home home, IntVar x0, IntVar x1,
2756 sqrt(Home home, IntVar x0, IntVar x1,
2768 pow(Home home, IntVar x0,
int n, IntVar x1,
2780 nroot(Home home, IntVar x0,
int n, IntVar x1,
2821 linear(Home home,
const IntVarArgs&
x,
2828 linear(Home home,
const IntVarArgs&
x,
2835 linear(Home home,
const IntVarArgs&
x,
2842 linear(Home home,
const IntVarArgs&
x,
2852 linear(Home home,
const IntArgs&
a,
const IntVarArgs&
x,
2862 linear(Home home,
const IntArgs&
a,
const IntVarArgs&
x,
2872 linear(Home home,
const IntArgs&
a,
const IntVarArgs&
x,
2882 linear(Home home,
const IntArgs&
a,
const IntVarArgs&
x,
2915 linear(Home home,
const BoolVarArgs&
x,
2922 linear(Home home,
const BoolVarArgs&
x,
2929 linear(Home home,
const BoolVarArgs&
x,
2936 linear(Home home,
const BoolVarArgs&
x,
2946 linear(Home home,
const IntArgs&
a,
const BoolVarArgs&
x,
2956 linear(Home home,
const IntArgs&
a,
const BoolVarArgs&
x,
2966 linear(Home home,
const IntArgs&
a,
const BoolVarArgs&
x,
2976 linear(Home home,
const IntArgs&
a,
const BoolVarArgs&
x,
3009 const IntVarArgs&
l,
3010 const IntVarArgs&
b,
const IntArgs& s,
3052 const IntVarArgs&
l,
const IntVarArgs&
b,
3053 const IntArgs& s,
const IntArgs&
c,
3077 const IntVarArgs&
x,
const IntArgs& w,
3078 const IntVarArgs&
y,
const IntArgs& h,
3095 const IntVarArgs&
x,
const IntArgs& w,
3096 const IntVarArgs&
y,
const IntArgs& h,
3097 const BoolVarArgs& o,
3117 const IntVarArgs& x0,
const IntVarArgs& w,
const IntVarArgs& x1,
3118 const IntVarArgs& y0,
const IntVarArgs& h,
const IntVarArgs& y1,
3139 const IntVarArgs& x0,
const IntVarArgs& w,
const IntVarArgs& x1,
3140 const IntVarArgs& y0,
const IntVarArgs& h,
const IntVarArgs& y1,
3141 const BoolVarArgs& o,
3162 order(Home home, IntVar s0,
int p0, IntVar s1,
int p1, BoolVar
b,
3209 const IntVarArgs& s,
const IntVarArgs&
p,
3210 const IntVarArgs& e,
const IntVarArgs&
u,
3211 const IntArgs&
c,
bool at_most,
3219 const IntVarArgs& s,
const IntVarArgs&
p,
3220 const IntVarArgs& e,
const IntVarArgs&
u,
3221 const IntArgs&
c,
bool at_most,
3229 const IntVarArgs& s,
const IntArgs&
p,
3230 const IntVarArgs& e,
const IntVarArgs&
u,
3231 const IntArgs&
c,
bool at_most,
3239 const IntVarArgs& s,
const IntArgs&
p,
3240 const IntVarArgs& e,
const IntVarArgs&
u,
3241 const IntArgs&
c,
bool at_most,
3249 const IntVarArgs& s,
const IntVarArgs&
p,
3250 const IntVarArgs& e,
const IntArgs&
u,
3251 const IntArgs&
c,
bool at_most,
3259 const IntVarArgs& s,
const IntVarArgs&
p,
3260 const IntVarArgs& e,
const IntArgs&
u,
3261 const IntArgs&
c,
bool at_most,
3269 const IntVarArgs& s,
const IntArgs&
p,
3270 const IntVarArgs& e,
const IntArgs&
u,
3271 const IntArgs&
c,
bool at_most,
3279 const IntVarArgs& s,
const IntArgs&
p,
3280 const IntVarArgs& e,
const IntArgs&
u,
3281 const IntArgs&
c,
bool at_most,
3311 unary(Home home,
const IntVarArgs& s,
const IntArgs&
p,
3343 unary(Home home,
const IntVarArgs& s,
const IntArgs&
p,
3426 const IntVarArgs& flex,
const IntArgs& fix,
3456 unary(Home home,
const IntVarArgs& s,
const IntVarArgs&
p,
3488 unary(Home home,
const IntVarArgs& s,
const IntVarArgs&
p,
3537 const IntVarArgs& flex,
const IntArgs& fix,
const IntArgs&
u,
3547 const IntVarArgs& flex,
const IntArgs& fix,
const IntArgs&
u,
3596 const IntVarArgs& flex,
const IntArgs& fix,
const IntArgs&
u,
3604 const IntVarArgs& flex,
const IntArgs& fix,
const IntArgs&
u,
3640 cumulative(Home home,
int c,
const IntVarArgs& s,
const IntArgs&
p,
3647 cumulative(Home home, IntVar
c,
const IntVarArgs& s,
const IntArgs&
p,
3685 cumulative(Home home,
int c,
const IntVarArgs& s,
const IntArgs&
p,
3692 cumulative(Home home, IntVar
c,
const IntVarArgs& s,
const IntArgs&
p,
3732 cumulative(Home home,
int c,
const IntVarArgs& s,
const IntVarArgs&
p,
3739 cumulative(Home home, IntVar
c,
const IntVarArgs& s,
const IntVarArgs&
p,
3781 cumulative(Home home,
int c,
const IntVarArgs& s,
const IntVarArgs&
p,
3782 const IntVarArgs& e,
const IntArgs&
u,
const BoolVarArgs& m,
3789 cumulative(Home home, IntVar
c,
const IntVarArgs& s,
const IntVarArgs&
p,
3790 const IntVarArgs& e,
const IntArgs&
u,
const BoolVarArgs& m,
3815 circuit(Home home,
const IntVarArgs&
x,
3833 circuit(Home home,
int offset,
const IntVarArgs&
x,
3859 const IntVarArgs&
x,
const IntVarArgs&
y, IntVar
z,
3885 const IntArgs&
c,
int offset,
3886 const IntVarArgs&
x,
const IntVarArgs&
y, IntVar
z,
3909 const IntVarArgs&
x, IntVar
z,
3933 const IntArgs&
c,
int offset,
3934 const IntVarArgs&
x, IntVar
z,
3952 path(Home home,
const IntVarArgs&
x, IntVar s, IntVar e,
3972 path(Home home,
int offset,
const IntVarArgs&
x, IntVar s, IntVar e,
3999 const IntVarArgs&
x, IntVar s, IntVar e,
const IntVarArgs&
y, IntVar
z,
4027 const IntArgs&
c,
int offset,
4028 const IntVarArgs&
x, IntVar s, IntVar e,
const IntVarArgs&
y, IntVar
z,
4053 const IntVarArgs&
x, IntVar s, IntVar e, IntVar
z,
4079 const IntArgs&
c,
int offset,
4080 const IntVarArgs&
x, IntVar s, IntVar e, IntVar
z,
4096 wait(Home home, IntVar
x, std::function<
void(Space& home)>
c,
4100 wait(Home home, BoolVar
x, std::function<
void(Space& home)>
c,
4104 wait(Home home,
const IntVarArgs&
x, std::function<
void(Space& home)>
c,
4108 wait(Home home,
const BoolVarArgs&
x,
4109 std::function<
void(Space& home)>
c,
4113 when(Home home, BoolVar
x,
4114 std::function<
void(Space& home)>
t,
4115 std::function<
void(Space& home)> e,
4119 when(Home home, BoolVar
x,
4120 std::function<
void(Space& home)>
t,
4175 typedef std::function<bool(
const Space& home, IntVar
x,
int i)>
4197 typedef std::function<double(
const Space& home,
IntVar x,
int i)>
4208 typedef std::function<double(
const Space& home,
BoolVar x,
int i)>
4221 typedef std::function<int(
const Space& home,
IntVar x,
int i)>
4247 typedef std::function<void(
Space& home,
unsigned int a,
4261 typedef std::function<void(
Space& home,
unsigned int a,
4548 typedef std::function<void(
const Space &home,
const Brancher&
b,
4550 IntVar
x,
int i,
const int&
n,
5071 branch(Home home,
const IntVarArgs&
x,
5072 IntVarBranch vars, IntValBranch vals,
5081 branch(Home home,
const IntVarArgs&
x,
5082 TieBreak<IntVarBranch> vars, IntValBranch vals,
5091 branch(Home home, IntVar
x, IntValBranch vals,
5099 branch(Home home,
const BoolVarArgs&
x,
5100 BoolVarBranch vars, BoolValBranch vals,
5109 branch(Home home,
const BoolVarArgs&
x,
5110 TieBreak<BoolVarBranch> vars, BoolValBranch vals,
5119 branch(Home home, BoolVar
x, BoolValBranch vals,
5128 assign(Home home,
const IntVarArgs&
x,
5129 IntVarBranch vars, IntAssign vals,
5138 assign(Home home,
const IntVarArgs&
x,
5139 TieBreak<IntVarBranch> vars, IntAssign vals,
5148 assign(Home home, IntVar
x, IntAssign vals,
5156 assign(Home home,
const BoolVarArgs&
x,
5157 BoolVarBranch vars, BoolAssign vals,
5166 assign(Home home,
const BoolVarArgs&
x,
5167 TieBreak<BoolVarBranch> vars, BoolAssign vals,
5176 assign(Home home, BoolVar
x, BoolAssign vals,
5189 branch(Home home,
const IntVarArgs&
x, IntValBranch vals,
5198 branch(Home home,
const BoolVarArgs&
x, BoolValBranch vals,
5208 assign(Home home,
const IntVarArgs&
x, IntAssign vals,
5217 assign(Home home,
const BoolVarArgs&
x, BoolAssign vals,
5230 template<
class Char,
class Traits>
5231 std::basic_ostream<Char,Traits>&
5232 operator <<(std::basic_ostream<Char,Traits>& os,
const DFA&
d);
5237 template<
class Char,
class Traits>
5238 std::basic_ostream<Char,Traits>&
5239 operator <<(std::basic_ostream<Char,Traits>& os,
const TupleSet& ts);
5246 namespace Int {
namespace LDSB {
5247 class SymmetryObject;
5260 void increment(
void);
5262 void decrement(
void);
5302 const IntArgs& indices);
5349 branch(Home home,
const IntVarArgs&
x,
5350 IntVarBranch vars, IntValBranch vals,
5351 const Symmetries& syms,
5366 branch(Home home,
const IntVarArgs&
x,
5367 TieBreak<IntVarBranch> vars, IntValBranch vals,
5368 const Symmetries& syms,
5383 branch(Home home,
const BoolVarArgs&
x,
5384 BoolVarBranch vars, BoolValBranch vals,
5385 const Symmetries& syms,
5400 branch(Home home,
const BoolVarArgs&
x,
5401 TieBreak<BoolVarBranch> vars, BoolValBranch vals,
5402 const Symmetries& syms,
5406 #ifdef GECODE_HAS_CBS
5429 cbsbranch(Home home,
const IntVarArgs&
x);
5453 cbsbranch(Home home,
const BoolVarArgs&
x);
5483 relax(Home home,
const IntVarArgs&
x,
const IntVarArgs& sx,
5508 relax(Home home,
const BoolVarArgs&
x,
const BoolVarArgs& sx,
5530 Int::ViewRanges<Int::IntView> > {
5568 int min(
void)
const;
5571 int max(
void)
const;
5573 unsigned int width(
void)
const;
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl)
Select variable with largest domain size.
Data & raw(void) const
Get raw data (must be initialized)
IntCHB & operator=(const IntCHB &chb)
Assignment operator.
const Range * lst(int i) const
Return last range for position i.
IntVarBranch INT_VAR_ACTION_MAX(double d, BranchTbl tbl)
Select variable with highest action with decay factor d.
void cumulatives(Home home, const IntVarArgs &m, const IntVarArgs &s, const IntVarArgs &p, const IntVarArgs &e, const IntVarArgs &u, const IntArgs &c, bool at_most, IntPropLevel cl)
Post propagators for the cumulatives constraint.
Select s
Which value to select.
Class for action management.
Duplicate of an integer view.
@ TE_PRUNE
Trace prune events.
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
IntCHB(void)
Construct as not yet initialized.
Post propagator for SetVar x
Data about values in the table.
IntRelType
Relation types for integers.
IntAction & operator=(const IntAction &a)
Assignment operator.
void unshare(Home home, IntVarArgs &x, IntPropLevel ipl)
Replace multiple variable occurences in x by fresh variables.
bool operator==(const DFA &d) const
Test whether DFA is equal to d.
Post propagator for SetVar SetOpType SetVar y
bool in(int n) const
Return whether n is included in the set.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
TupleSet & add(const IntArgs &t)
Add tuple t to tuple set.
BoolAssign BOOL_ASSIGN_RND(Rnd r)
Select random value.
BoolAssign BOOL_ASSIGN_MIN(void)
Select smallest value.
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl)
Select variable with smallest degree divided by domain size.
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntPropLevel)
Post propagator for bin packing.
@ SEL_RANGE_MAX
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Iter::Ranges::RangeList ro
Iterator over the old values.
Trace delta information for Boolean variables.
int min(void) const
Return minimum of domain.
int delta
Delta information.
@ RM_PMI
Inverse implication for reification.
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
#define GECODE_VTABLE_EXPORT
std::size_t hash(void) const
Return hash key.
const Range * fst(int i) const
Return first range for position i.
unsigned int words(void) const
Return number of required bit set words.
Integer set initialization.
IntVarBranch INT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
Int::ViewRanges< Int::IntView > rn
Iterator over the new values.
bool in(int n) const
Test whether n is contained in domain.
int min(void) const
Return smallest value of range.
SymmetryHandle VariableSymmetry(const IntVarArgs &vars)
Variables in x are interchangeable.
BitSetData * s
Begin of supports.
bool none(void) const
Test whether domain is neither zero nor one.
IntValBranch INT_VAL_RANGE_MIN(void)
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool operator()(void) const
Test whether iterator is still at a range.
int max(void) const
Return maximum of domain.
const long long int llmin
Smallest allowed long long integer value.
@ SEL_RND
Random (uniform, for tie breaking)
@ SEL_CHB_MAX
With highest CHB Q-score.
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
@ SEL_ACTION_MAX
With highest action.
@ SEL_SIZE_MAX
With largest domain size.
@ IRT_GQ
Greater or equal ( )
int med(void) const
Return median of domain (greatest element not greater than the median)
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
@ SEL_MERIT_MIN
With least merit.
Select select(void) const
Return selection strategy.
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl)
Select variable with smallest min.
unsigned int width(void) const
Return width of set (distance between maximum and minimum)
Passing integer variables.
SymmetryHandle ValueSequenceSymmetry(const IntArgs &vs, int ss)
Value sequences in v of size ss are interchangeable.
ViewTracer< Int::BoolView > BoolTracer
Tracer for Boolean variables.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
Select s
Which value to select.
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl)
Select variable with smallest min-regret.
static const IntSet empty
Empty set.
IntVarBranch INT_VAR_CHB_MIN(IntCHB c, BranchTbl tbl)
Select variable with lowest CHB Q-score.
Reify eqv(BoolVar x)
Use equivalence for reification.
std::function< void(const Space &home, const Brancher &b, unsigned int a, BoolVar x, int i, const int &n, std::ostream &o)> BoolVarValPrint
Function type for printing branching alternatives for Boolean variables.
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
Recording actions for Boolean variables.
Value iterator for integer variables.
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
IntValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Symbols(const DFA &d)
Initialize to symbols of DFA d.
@ IPL_ADVANCED
Use advanced propagation algorithm.
Implementation of a symmetry at the modelling level.
const Range * c
Current range.
IntSet(void)
Initialize as empty set.
Select s
Which value to select.
IntTraceDelta(Int::IntTraceView o, Int::IntView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Range iterator for ranges of integer variable implementation.
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Class for CHB management.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void cumulative(Home home, int c, const TaskTypeArgs &t, const IntVarArgs &s, const IntArgs &p, const IntArgs &u, IntPropLevel ipl)
Post propagators for scheduling tasks on cumulative resources.
IntValBranch INT_VAL_MED(void)
Select greatest value not greater than the median.
const long long int llinfinity
Infinity for long long integers.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl)
Select variable with smallest max-regret.
@ RM_IMP
Implication for reification.
IntVarBranch(void)
Initialize with strategy SEL_NONE.
static StdIntTracer def
Default tracer (printing to std::cerr)
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
int min(void) const
Return smallest value of range.
int min(void) const
Return minimal value in all tuples.
@ SEL_ACTION_MAX
With highest action.
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl)
Select variable with smallest max.
IntValBranch INT_VAL(IntBranchVal v, IntBranchCommit c)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
@ SEL_DEGREE_MAX
With largest degree.
int max(void) const
Return maximal value in all tuples.
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
BoolVarBranch BOOL_VAR_ACTION_MAX(double d, BranchTbl tbl)
Select variable with highest action with decay factor d.
@ SEL_RND
Random (uniform, for tie breaking)
@ IPL_VAL
Value propagation.
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
BoolCHB(void)
Construct as not yet initialized.
Trace delta information for integer variables.
TupleSet & operator=(const TupleSet &t)
Assignment operator.
@ SEL_AFC_MIN
With smallest accumulated failure count.
@ SEL_REGRET_MAX_MIN
With smallest max-regret.
int final_fst(void) const
Return the number of the first final state.
@ TE_FIX
Trace fixpoint events.
DFA(void)
Initialize for DFA accepting the empty word.
void operator++(void)
Move iterator to next range (if possible)
IntPropLevel
Propagation levels for integer propagators.
Which values to select for branching first.
int min(void) const
Return minimum of domain.
BoolVarBranch BOOL_VAR_MERIT_MAX(BoolBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
Which integer variable to select for branching.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
bool normalize(Term< View > *t, int &n, Term< View > *&t_p, int &n_p, Term< View > *&t_n, int &n_n, int &g)
Normalize linear integer constraints.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
ViewTraceRecorder< Int::BoolView > BoolTraceRecorder
Trace recorder for Boolean variables.
@ SEL_AFC_MIN
With smallest accumulated failure count.
void init(const IntVar &x)
Initialize with ranges for integer variable x.
Recording AFC information for integer variables.
int n_transitions(void) const
Return the number of transitions.
@ SEL_MAX_MAX
With largest max.
std::function< int(const Space &home, BoolVar x, int i)> BoolBranchVal
Branch value function type for Boolean variables.
@ SEL_AFC_MAX
With largest accumulated failure count.
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
BoolValBranch BOOL_VAL_RND(Rnd r)
Select random value.
void operator++(void)
Move iterator to next symbol.
@ SEL_DEGREE_MIN
With smallest degree.
Range iterator for integer sets.
bool valid(int n)
Return whether n is in range.
BoolVarArgs(void)
Allocate empty array.
int symbol_max(void) const
Return largest symbol in DFA.
BoolValBranch BOOL_VAL(BoolBranchVal v, BoolBranchCommit c)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
void init(const IntVar &x)
Initialize with values x.
unsigned int size(void) const
Return size (cardinality) of set.
@ SEL_MAX_MIN
With smallest max.
Select s
Which variable to select.
const long long int llmax
Largest allowed long long integer value.
@ SEL_MAX
Select largest value.
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel)
Post propagator for .
IntVarArgs(void)
Allocate empty array.
int min(void) const
Return minimum of entire set.
std::ostream & os
Output stream to use.
IntVarBranch INT_VAR_CHB_SIZE_MAX(IntCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score divided by domain size.
IntSetRanges(void)
Default constructor.
std::function< double(const Space &home, BoolVar x, int i)> BoolBranchMerit
Branch merit function type for Boolean variables.
BoolVar(void)
Default constructor.
@ SEL_ACTION_MIN
With lowest action.
BoolVarBranch BOOL_VAR_MERIT_MIN(BoolBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
IntArgs(void)
Allocate empty array.
Boolean view for Boolean variables.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Recording CHB for integer variables.
Collection of symmetries.
void init(Home home, const BoolVarArgs &x, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x.
Variable branching information.
bool one(void) const
Test whether domain is one.
Gecode toplevel namespace
IntVarRanges(void)
Default constructor.
IntAFC & operator=(const IntAFC &a)
Assignment operator.
int max(void) const
Return largest value of range.
@ SEL_MIN
Select smallest value.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
union Gecode::@602::NNF::@65 u
Union depending on nodetype t.
double tbl(const Gecode::Space &, double w, double b)
Test function for tie-break limit function.
@ SEL_AFC_MAX
With largest accumulated failure count.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_MIN
Select smallest value.
TupleSet(void)
Construct an unitialized tuple set.
bool operator==(const IntSet &s) const
Return whether s is equal.
Reify pmi(BoolVar x)
Use reverse implication for reification.
BoolVar x
The Boolean control variable.
std::function< double(const Space &home, IntVar x, int i)> IntBranchMerit
Branch merit function type for integer variables.
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
int med(void) const
Return median of domain (greatest element not greater than the median)
Select s
Which variable to select.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
int symbol(void) const
Return symbol of current transition.
Recording AFC information for Boolean variables.
@ TE_DONE
Trace done events.
Select
Which value selection.
@ SEL_RND
Select random value.
@ SEL_CHB_MAX
With highest CHB.
IntAFC(void)
Construct as not yet initialized.
int n
Number of variables (size)
BoolOpType
Operation types for Booleans.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Argument array for non-primitive types.
Which Boolean variable to select for branching.
void init(Home home, const BoolVarArgs &x, double d=1.0, bool share=true)
Initialize for Boolean variables x with decay factor d.
Which values to select for assignment.
unsigned int n_symbols(void) const
Return the number of symbols.
Generic domain change information to be supplied to advisors.
void finalize(void)
Finalize tuple set.
unsigned int n_words
Number of words for support.
Base-class for branchers.
ArgArray< IntSet > IntSetArgs
Passing set arguments.
Standard Boolean variable tracer.
Reification specification.
#define GECODE_INT_EXPORT
Passing Boolean variables.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
@ RM_EQV
Equivalence for reification (default)
@ SEL_RND
Select random value.
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl)
Select variable with largest min.
Home class for posting propagators
Select
Which value selection.
Specification of a DFA transition.
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
IntValBranch INT_VAL_RANGE_MAX(void)
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
IntVarBranch INT_VAR_AFC_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count divided by domain size with decay factor d.
@ IPL_BASIC_ADVANCED
Use both.
Value iterator from range iterator.
@ SEL_MAX
Select largest value.
IntValBranch INT_VALUES_MAX(void)
Try all values starting from largest.
Transitions(const DFA &d)
Initialize to all transitions of DFA d.
ViewTraceRecorder< Int::IntView > IntTraceRecorder
Trace recorder for integer variables.
int o_state
output state Default constructor
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
Range * range
Pointer to all ranges.
Select select(void) const
Return selection strategy.
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
int val(void) const
Return current symbol.
Tracer that process view trace information.
BoolVarBranch BOOL_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl)
Select variable with largest min-regret.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
const BitSetData * supports(unsigned int n_words, int n) const
Return the supports for value n.
@ SEL_MAX
Select largest value.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
@ SEL_REGRET_MIN_MAX
With largest min-regret.
Post propagator for SetVar SetOpType SetVar SetRelType r
Standard integer variable tracer.
Range iterator for computing set difference.
std::ostream & os
Output stream to use.
@ SEL_RND
Select random value.
Boolean integer variables.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
BoolAction & operator=(const BoolAction &a)
Assignment operator.
int o_state(void) const
Return out-state of current transition.
Select s
Which value to select.
BoolVarArray(void)
Default constructor (array of size 0)
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
Range iterator for integer variables
int * Tuple
Type of a tuple.
void init(const IntSet &s)
Initialize with values for s.
@ SEL_REGRET_MAX_MAX
With largest max-regret.
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.
int min(void) const
Return smallest value of range.
Value branching information.
@ TE_INIT
Trace init events.
IntVarBranch INT_VAR_CHB_SIZE_MIN(IntCHB c, BranchTbl tbl)
Select variable with smallest CHB Q-score divided by domain size.
void circuit(Home home, int offset, const IntVarArgs &x, IntPropLevel ipl)
Post propagator such that x forms a circuit.
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
void assign(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatAssign vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with variable selection vars and value selection vals.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
const int max
Largest allowed integer value.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
IntSetValues(void)
Default constructor.
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
void order(Home home, IntVar s0, int p0, IntVar s1, int p1, BoolVar b, IntPropLevel)
Post propagators for ordering two tasks.
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
@ SEL_VALUES_MIN
Select all values starting from smallest.
Iterator for DFA transitions (sorted by symbols)
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
void _add(const IntArgs &t)
Add tuple t to tuple set.
int i_state(void) const
Return in-state of current transition.
bool finalized(void) const
Is tuple set finalized.
BoolValBranch BOOL_VAL_MAX(void)
Select largest value.
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
unsigned int max_degree(void) const
Return maximal degree (in-degree and out-degree) of any state.
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c)
Select value as defined by the value function v and commit function c.
void operator++(void)
Move iterator to next range (if possible)
bool in(int n) const
Test whether n is contained in domain.
Duplicate of a Boolean view.
Propagator for recording view trace information.
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
bool operator()(void) const
Test whether iterator still at a symbol.
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
BoolValBranch BOOL_VAL_MIN(void)
Select smallest value.
Class represeting a set of tuples.
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl)
Select variable with largest degree divided by domain size.
BoolVarBranch BOOL_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
@ SEL_NONE
First unassigned.
@ IPL_BND
Bounds propagation.
unsigned int size(void) const
Return size (cardinality) of domain.
Select select(void) const
Return selection strategy.
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l.
Select
Which variable selection.
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
@ SEL_DEGREE_MIN
With smallest degree.
bool operator()(void) const
Test whether iterator is still at a range or done.
void member(Home home, const IntVarArgs &x, IntVar y, IntPropLevel)
Post domain consistent propagator for .
Select
Which variable selection.
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
@ SEL_MERIT_MAX
With highest merit.
BoolVarBranch BOOL_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
Recording actions for integer variables.
IntVarBranch INT_VAR_ACTION_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest action divided by domain size with decay factor d.
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
Select
Which value selection.
void expand(Home home, const IntVarArgs &x)
Expand AFC, action, and CHB.
@ SEL_RANGE_MIN
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
IntRelType neg(IntRelType irt)
Return negated relation type of irt.
@ SEL_MED
Select greatest value not greater than the median.
int n_states(void) const
Return the number of states.
IntVar(void)
Default constructor.
Select select(void) const
Return selection strategy.
@ IPL_BASIC
Use basic propagation algorithm.
@ SEL_MERIT_MAX
With highest merit.
BoolAFC(void)
Construct as not yet initialized.
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel)
Post propagator for .
TaskType
Type of task for scheduling constraints.
BoolTraceDelta(Int::BoolTraceView o, Int::BoolView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
BoolAFC & operator=(const BoolAFC &a)
Assignment operator.
@ SEL_MERIT_MIN
With least merit.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Tuple operator[](int i) const
Get tuple i.
BoolVarBranch BOOL_VAR_CHB_MIN(BoolCHB c, BranchTbl tbl)
Select variable with lowest CHB Q-score.
A reference-counted pointer to a SymmetryObject.
Deterministic finite automaton (DFA)
Recording CHB for Boolean variables.
BoolVar var(void) const
Return Boolean control variable.
std::function< int(const Space &home, IntVar x, int i)> IntBranchVal
Branch value function type for integer variables.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Select select(void) const
Return selection strategy.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
void expand(Home home, const BoolVarArgs &x)
Expand decay factor into AFC or action.
Class for AFC (accumulated failure count) management.
bool operator!=(const IntSet &s) const
Return whether s is not equal.
IntAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
int max(void) const
Return maximum of entire set.
BoolValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
void init(Home home, const IntVarArgs &x, IntBranchMerit bm=nullptr)
Initialize for integer variables x.
BoolAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
bool equal(const TupleSet &t) const
Test whether tuple set is equal to t.
void init(Home home, const IntVarArgs &x, double d=1.0, bool share=true)
Initialize for integer variables x with decay factor d.
@ SEL_CHB_MIN
With lowest CHB.
@ IPL_DEF
Simple propagation levels.
@ SEL_MIN_MIN
With smallest min.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
const int infinity
Infinity for integers.
SymmetryHandle ValueSymmetry(const IntArgs &vs)
Values in v are interchangeable.
bool operator!=(const TupleSet &t) const
Test whether tuple set is different from t.
int final_lst(void) const
Return the number of the last final state.
Variables as interfaces to variable implementations.
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
BoolCHB & operator=(const BoolCHB &chb)
Assignment operator.
@ SEL_MAX
Select largest value.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
ValueData * vd
Value data.
IntVarBranch INT_VAR_CHB_MAX(IntCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score.
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl)
Select variable with largest max.
ReifyMode
Mode for reification.
@ SEL_ACTION_MIN
With lowest action.
void operator++(void)
Move iterator to next transition.
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel)
Post propagator that s precedes t in x.
void init(const IntSet &s)
Initialize with ranges for set s.
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &vars, int ss)
Variable sequences in x of size ss are interchangeable.
std::size_t hash(void) const
Return hash key.
IntAssign INT_ASSIGN_MED(void)
Select greatest value not greater than the median.
ViewTracer< Int::IntView > IntTracer
Tracer for integer variables.
Gecode::Support::BitSetData BitSetData
Import bit set data type.
static StdBoolTracer def
Default tracer (printing to std::cerr)
std::function< void(Space &home, unsigned int a, BoolVar x, int i, int n)> BoolBranchCommit
Branch commit function type for Boolean variables.
Reify(void)
Default constructor without proper initialization.
int max(void) const
Return largest value of range.
Integer view for integer variables.
IntVarBranch INT_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
BoolAssign BOOL_ASSIGN_MAX(void)
Select largest value.
Traits of arrays in Gecode.
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
BoolVarBranch BOOL_VAR_ACTION_MIN(double d, BranchTbl tbl)
Select variable with lowest action with decay factor d.
IntVarValues(void)
Default constructor.
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
bool operator()(void) const
Test whether iterator is still at a range or done.
int max(void) const
Return maximum of domain.
void init(int a)
Initialize an uninitialized tuple set.
void when(Home home, BoolVar x, std::function< void(Space &home)> t, std::function< void(Space &home)> e, IntPropLevel)
Execute t (then) when x is assigned one, and e (else) otherwise.
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
int tuples(void) const
Number of tuples.
Ranges(const TupleSet &ts, int i)
Initialize for column i.
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te, FloatTracer &t)
Create a tracer for float variables.
@ _IPL_BITS
Number of bits required (internal)
ReifyMode mode(void) const
Return reification mode.
BoolVarBranch BOOL_VAR_CHB_MAX(BoolCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score.
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl)
Post propagator such that x forms a Hamiltonian path.
bool operator==(const TupleSet &t) const
Test whether tuple set is equal to t.
const int min
Smallest allowed integer value.
int val(void) const
Return assigned value.
int arity(void) const
Arity of tuple set.
void extensional(Home home, const IntVarArgs &x, DFA dfa, IntPropLevel)
Post domain consistent propagator for extensional constraint described by a DFA.
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel)
Post propagator for .
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Reify imp(BoolVar x)
Use implication for reification.
Select
Which value selection.
@ SEL_VALUES_MAX
Select all values starting from largest.
Rnd r
Random number generator.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl)
Post propagator for for all .
IntVarBranch INT_VAR_ACTION_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest action divided by domain size with decay factor d.
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, int n, IntPropLevel)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
int val(void) const
Return assigned value.
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
unsigned int width(void) const
Return the width.
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel)
Post propagator for rectangle packing.
bool operator()(void) const
Test whether iterator still at a transition.
ReifyMode rm
The reification mode.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
IntAction(void)
Construct as not yet initialized.
BoolAction(void)
Construct as not yet initialized.
Which values to select for assignment.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
void operator++(void)
Move iterator to next range (if possible)
Data & data(void) const
Get data (must be initialized and finalized)
bool range(void) const
Test whether domain is a range.
Gecode::FloatVal c(-8, 8)
BoolVarBranch BOOL_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
int n_tuples
Number of Tuples.
IntVarArray(void)
Default constructor (array of size 0)
Range iterator for range lists
ArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
int n
Number of negative literals for node type.
bool zero(void) const
Test whether domain is zero.
BoolAssign BOOL_ASSIGN(BoolBranchVal v, BoolBranchCommit c)
Select value as defined by the value function v and commit function c.
Argument array for variables.
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
std::function< bool(const Space &home, BoolVar x, int i)> BoolBranchFilter
Branch filter function type for Boolean variables.
@ SEL_NONE
First unassigned.
Passing integer arguments.
const Range * l
Last range.
Select select(void) const
Return selection strategy.
Value iterator for integer sets.
bool range(void) const
Test whether domain is a range.
void init(Home home, const BoolVarArgs &x, double d=1.0, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x with decay factor d.
void init(int s, Transition t[], int f[], bool minimize=true)
Initialize DFA.
Gecode::IntArgs i({1, 2, 3, 4})
bool pos(const View &x)
Test whether x is postive.
int max(void) const
Return largest value of range.
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, const IntVarArgs &z, IntPropLevel)
Post propagator that y is x sorted in increasing order.
unsigned int n
Number of ranges.
@ SEL_MIN
Select smallest value.
@ SEL_SIZE_MIN
With smallest domain size.
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntPropLevel ipl)
Post propagators for scheduling tasks on unary resources.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
int n_free
Number of free tuple entries of arity.
BoolVarBranch(void)
Initialize with strategy SEL_NONE.
int p
Number of positive literals for node type.
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl)
Select variable with largest max-regret.
BoolVarBranch BOOL_VAR_NONE(void)
Select first unassigned variable.
BitSetData * support
Pointer to all support data.
@ TE_FAIL
Trace fail events.
int symbol_min(void) const
Return smallest symbol in DFA.
void init(Home home, const IntVarArgs &x, double d=1.0, IntBranchMerit bm=nullptr)
Initialize for integer variables x with decay factor d.
Archive & operator<<(Archive &e, FloatNumBranch nl)
@ SEL_CHB_MIN
With lowest CHB Q-score.
@ SEL_RND
Select random value.
unsigned int start(int n) const
Find start range for value n.
Iterator for DFA symbols.
IntValBranch INT_VAL_MAX(void)
Select largest value.
@ SEL_MIN
Select smallest value.
BoolVarBranch BOOL_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
bool operator!=(const DFA &d) const
Test whether DFA is not equal to d.
int ranges(void) const
Return number of ranges of the specification.
@ SEL_MED
Select greatest value not greater than the median.
@ SEL_MIN_MAX
With largest min.
@ IRT_LQ
Less or equal ( )
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
std::function< void(const Space &home, const Brancher &b, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)> IntVarValPrint
Function type for printing branching alternatives for integer variables.
std::function< void(Space &home, unsigned int a, IntVar x, int i, int n)> IntBranchCommit
Branch commit function type for integer variables.
IntVarBranch INT_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
Which values to select for branching first.
IntValBranch INT_VAL_RND(Rnd r)
Select random value.
IntAssign INT_ASSIGN_MIN(void)
Select smallest value.
unsigned int size(void) const
Return size (cardinality) of domain.
IntVarBranch INT_VAR_ACTION_MIN(double d, BranchTbl tbl)
Select variable with lowest action with decay factor d.
@ SEL_REGRET_MIN_MIN
With smallest min-regret.
@ SEL_DEGREE_MAX
With largest degree.