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);
236 IntSet(std::initializer_list<int>
r);
243 IntSet(std::initializer_list<std::pair<int,int>>
r);
248 int ranges(
void)
const;
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;
306 void init(
const IntSet& s);
311 bool operator ()(
void)
const;
314 void operator ++(
void);
324 unsigned int width(
void)
const;
342 void init(
const IntSet& s);
350 template<
class Char,
class Traits>
351 std::basic_ostream<Char,Traits>&
352 operator <<(std::basic_ostream<Char,Traits>& os,
const IntSet& s);
443 unsigned int size(
void)
const;
445 unsigned int width(
void)
const;
447 unsigned int regret_min(
void)
const;
449 unsigned int regret_max(
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>&
467 operator <<(std::basic_ostream<Char,Traits>& os,
const IntVar&
x);
482 void init(
const IntVar& x);
499 void init(
const IntVar& x);
565 unsigned int size(
void)
const;
567 unsigned int width(
void)
const;
569 unsigned int regret_min(
void)
const;
571 unsigned int regret_max(
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>&
599 operator <<(std::basic_ostream<Char,Traits>& os,
const BoolVar&
x);
639 IntArgs(
const std::vector<int>& x);
641 IntArgs(std::initializer_list<int> x);
643 template<
class InputIterator>
644 IntArgs(InputIterator first, InputIterator last);
651 static IntArgs create(
int n,
int start,
int inc=1);
673 template<
class InputIterator>
674 IntVarArgs(InputIterator first, InputIterator last);
729 template<
class InputIterator>
730 BoolVarArgs(InputIterator first, InputIterator last);
2065 Transition(
int i_state0,
int symbol0,
int o_state0);
2080 bool operator ()(
void)
const;
2082 void operator ++(
void);
2084 int i_state(
void)
const;
2086 int symbol(
void)
const;
2088 int o_state(
void)
const;
2101 bool operator ()(
void)
const;
2103 void operator ++(
void);
2105 int val(
void)
const;
2119 void init(
int s,
Transition t[],
int f[],
bool minimize=
true);
2147 DFA(
int s, std::initializer_list<Transition> t,
2148 std::initializer_list<int> f,
bool minimize=
true);
2157 int n_states(
void)
const;
2159 int n_transitions(
void)
const;
2161 unsigned int n_symbols(
void)
const;
2163 unsigned int max_degree(
void)
const;
2165 int final_fst(
void)
const;
2167 int final_lst(
void)
const;
2169 int symbol_min(
void)
const;
2171 int symbol_max(
void)
const;
2173 std::size_t hash(
void)
const;
2209 unsigned int width(
void)
const;
2211 const BitSetData* supports(
unsigned int n_words,
int n)
const;
2222 unsigned int start(
int n)
const;
2231 static const int n_initial_free = 1024;
2259 Tuple
get(
int i)
const;
2261 static void set(BitSetData*
d,
unsigned int n);
2263 static bool get(
const BitSetData*
d,
unsigned int n);
2265 unsigned int tuple2idx(Tuple
t)
const;
2267 const Range* fst(
int i)
const;
2269 const Range* lst(
int i)
const;
2272 void finalize(
void);
2277 bool finalized(
void)
const;
2282 virtual ~
Data(
void);
2286 Data& data(
void)
const;
2288 Data& raw(
void)
const;
2316 operator bool(
void)
const;
2328 bool finalized(
void)
const;
2330 void finalize(
void);
2335 int arity(
void)
const;
2338 int tuples(
void)
const;
2340 unsigned int words(
void)
const;
2342 Tuple operator [](
int i)
const;
2344 int min(
void)
const;
2346 int max(
void)
const;
2348 std::size_t hash(
void)
const;
2353 const Range* fst(
int i)
const;
2356 const Range* lst(
int i)
const;
2373 bool operator ()(
void)
const;
2376 void operator ++(
void);
2381 int min(
void)
const;
2384 int max(
void)
const;
2386 unsigned int width(
void)
const;
4046 std::function<
void(
Space& home)>
c,
4051 std::function<
void(
Space& home)>
t,
4052 std::function<
void(
Space& home)> e,
4057 std::function<
void(
Space& home)>
t,
4112 typedef std::function<bool(const Space& home, IntVar x, int i)>
4122 typedef std::function<bool(const Space& home, BoolVar x, int i)>
4134 typedef std::function<double(const Space& home, IntVar x, int i)>
4145 typedef std::function<double(const Space& home, BoolVar x, int i)>
4158 typedef std::function<int(const Space& home, IntVar x, int i)>
4170 typedef std::function<int(const Space& home, BoolVar x, int i)>
4184 typedef std::function<void(
Space& home,
unsigned int a,
4198 typedef std::function<void(
Space& home,
unsigned int a,
4245 void init(
Home home,
const IntVarArgs& x,
double d=1.0,
bool share=
true);
4492 typedef std::function<void(
const Space &home,
const Brancher& b,
4494 BoolVar x,
int i,
const int& n,
4583 Select select(
void)
const;
4631 Select select(
void)
const;
4818 Select select(
void)
const;
4846 Select select(
void)
const;
4929 Select select(
void)
const;
4957 Select select(
void)
const;
5100 template<
class Char,
class Traits>
5101 std::basic_ostream<Char,Traits>&
5102 operator <<(std::basic_ostream<Char,Traits>& os,
const DFA&
d);
5107 template<
class Char,
class Traits>
5108 std::basic_ostream<Char,Traits>&
5109 operator <<(std::basic_ostream<Char,Traits>& os,
const TupleSet& ts);
5116 namespace Int {
namespace LDSB {
5130 void increment(
void);
5132 void decrement(
void);
5276 #ifdef GECODE_HAS_CBS 5400 Int::ViewRanges<Int::IntView> > {
5430 bool operator ()(
void)
const;
5433 void operator ++(
void);
5438 int min(
void)
const;
5441 int max(
void)
const;
5443 unsigned int width(
void)
const;
5479 virtual void init(
const Space& home,
const IntTraceRecorder&
t);
5481 virtual void prune(
const Space& home,
const IntTraceRecorder&
t,
5484 virtual void fix(
const Space& home,
const IntTraceRecorder&
t);
5486 virtual void fail(
const Space& home,
const IntTraceRecorder&
t);
5488 virtual void done(
const Space& home,
const IntTraceRecorder&
t);
5517 virtual void init(
const Space& home,
const BoolTraceRecorder&
t);
5519 virtual void prune(
const Space& home,
const BoolTraceRecorder&
t,
5522 virtual void fix(
const Space& home,
const BoolTraceRecorder&
t);
5524 virtual void fail(
const Space& home,
const BoolTraceRecorder&
t);
5526 virtual void done(
const Space& home,
const BoolTraceRecorder&
t);
Value iterator for integer variables.
BoolValBranch BOOL_VAL_RND(Rnd r)
Select random value.
const Range * c
Current range.
std::function< void(Space &home, unsigned int a, IntVar x, int i, int n)> IntBranchCommit
Branch commit function type for integer variables.
std::function< double(const Space &home, BoolVar x, int i)> BoolBranchMerit
Branch merit function type for Boolean variables.
With smallest accumulated failure count.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl)
Select variable with largest degree divided by domain size.
Int::ViewRanges< Int::IntView > rn
Iterator over the new values.
IntValBranch INT_VAL_RANGE_MIN(void)
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Duplicate of a Boolean view.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Variables as interfaces to variable implementations.
Tracer that process view trace information.
IntVarBranch INT_VAR_CHB_SIZE_MAX(IntCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score divided by domain size.
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Combine variable selection criteria for tie-breaking.
Select s
Which variable to select.
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
BoolVarBranch BOOL_VAR_NONE(void)
Select first unassigned variable.
TaskType
Type of task for scheduling constraints.
Inverse implication for reification.
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, const IntVarArgs &z, IntPropLevel)
Post propagator that y is x sorted in increasing order.
int n_free
Number of free tuple entries of arity.
BoolVarBranch BOOL_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
Select s
Which value to select.
Range iterator for integer sets.
BoolAssign BOOL_ASSIGN_MIN(void)
Select smallest value.
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel)
Post propagator for .
Iterator for DFA symbols.
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.
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
Which values to select for branching first.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Iter::Ranges::RangeList ro
Iterator over the old values.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
Standard Boolean variable tracer.
Select
Which value selection.
BoolOpType
Operation types for Booleans.
With smallest accumulated failure count.
Which values to select for branching first.
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl)
Select variable with largest domain size.
Which integer variable to select for branching.
With largest accumulated failure count.
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
IntAssign INT_ASSIGN_MED(void)
Select greatest value not greater than the median.
Select s
Which value to select.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl)
Select variable with smallest min-regret.
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
BoolVarBranch BOOL_VAR_ACTION_MIN(double d, BranchTbl tbl)
Select variable with lowest action with decay factor d.
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.
bool pos(const View &x)
Test whether x is postive.
Range iterator for range lists
With largest accumulated failure count divided by domain size.
IntVarBranch INT_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
int * Tuple
Type of a tuple.
void member(Home home, const IntVarArgs &x, IntVar y, IntPropLevel)
Post domain consistent propagator for .
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl)
Post propagator such that x forms a Hamiltonian path.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Collection of symmetries.
Which values to select for assignment.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
Implementation of a symmetry at the modelling level.
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_CHB_SIZE_MIN(IntCHB c, BranchTbl tbl)
Select variable with smallest CHB Q-score divided by domain size.
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l...
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
void circuit(Home home, int offset, const IntVarArgs &x, IntPropLevel ipl)
Post propagator such that x forms a circuit.
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
BoolVarBranch BOOL_VAR_MERIT_MIN(BoolBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
BoolAssign BOOL_ASSIGN_MAX(void)
Select largest value.
BitSetData * support
Pointer to all support data.
Select s
Which value to select.
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl)
Select variable with largest min-regret.
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntPropLevel)
Post propagator for bin packing.
ArgArray< IntSet > IntSetArgs
Passing set arguments.
const int max
Largest allowed integer value.
With largest accumulated failure count.
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
Standard integer variable tracer.
Select s
Which value to select.
ViewTracer< Int::IntView > IntTracer
Tracer for integer variables.
const int min
Smallest allowed integer value.
ViewTraceRecorder< Int::IntView > IntTraceRecorder
Trace recorder for integer variables.
ArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
Range iterator for integer variables
IntAssign INT_ASSIGN_MIN(void)
Select smallest value.
IntValBranch INT_VAL_RND(Rnd r)
Select random value.
Random (uniform, for tie breaking)
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl)
Select variable with largest max.
Select s
Which variable to select.
ValueData * vd
Value data.
std::string expand(Gecode::IntRelType irt)
Expand relation to abbreviation.
Reify imp(BoolVar x)
Use implication for reification.
Gecode::FloatVal c(-8, 8)
SymmetryHandle VariableSymmetry(const IntVarArgs &vars)
Variables in x are interchangeable.
Deterministic finite automaton (DFA)
int p
Number of positive literals for node type.
IntVarBranch INT_VAR_ACTION_MAX(double d, BranchTbl tbl)
Select variable with highest action with decay factor d.
With smallest max-regret.
BoolValBranch BOOL_VAL_MIN(void)
Select smallest value.
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...
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c)
Select value as defined by the value function v and commit function c.
Base-class for branchers.
Class for AFC (accumulated failure count) management.
IntRelType neg(IntRelType irt)
Return negated relation type of irt.
BoolValBranch BOOL_VAL_MAX(void)
Select largest value.
int n
Number of negative literals for node type.
void unshare(Home home, IntVarArgs &x, IntPropLevel ipl)
Replace multiple variable occurences in x by fresh variables.
const long long int llmin
Smallest allowed long long integer value.
Gecode::IntArgs i({1, 2, 3, 4})
With smallest min-regret.
A reference-counted pointer to a SymmetryObject.
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel)
Post propagator for .
std::function< int(const Space &home, IntVar x, int i)> IntBranchVal
Branch value function type for integer variables.
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel)
Post propagator for .
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
With largest action divided by domain size.
unsigned int n_words
Number of words for support.
Select
Which value selection.
IntRelType
Relation types for integers.
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl)
Select variable with smallest min.
SymmetryHandle ValueSequenceSymmetry(const IntArgs &vs, int ss)
Value sequences in v of size ss are interchangeable.
Select greatest value not greater than the median.
BoolVarBranch BOOL_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Range * range
Pointer to all ranges.
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
Simple propagation levels.
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
void extensional(Home home, const IntVarArgs &x, DFA dfa, IntPropLevel)
Post domain consistent propagator for extensional constraint described by a DFA.
Recording AFC information for integer variables.
BoolVarBranch BOOL_VAR_CHB_MAX(BoolCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Specification of a DFA transition.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Use basic propagation algorithm.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
Value iterator from range iterator.
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
Class for CHB management.
unsigned int size(I &i)
Size of all ranges of range iterator i.
Reification specification.
SymmetryHandle ValueSymmetry(const IntArgs &vs)
Values in v are interchangeable.
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
Range iterator for ranges of integer variable implementation.
IntVarBranch INT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl)
Post propagator for for all .
With largest domain size.
Duplicate of an integer view.
Recording AFC information for Boolean variables.
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
Recording actions for Boolean variables.
BoolAssign BOOL_ASSIGN_RND(Rnd r)
Select random value.
Integer set initialization.
BoolAssign BOOL_ASSIGN(BoolBranchVal v, BoolBranchCommit c)
Select value as defined by the value function v and commit function c.
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...
Which Boolean variable to select for branching.
int o_state
output state Default constructor
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
IntVarBranch INT_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
Use advanced propagation algorithm.
std::ostream & os
Output stream to use.
BitSetData * s
Begin of supports.
With largest CHB Q-score divided by domain size.
static StdIntTracer def
Default tracer (printing to std::cerr)
Recording CHB for integer variables.
Reify eqv(BoolVar x)
Use equivalence for reification.
With largest degree divided by domain size.
Passing integer variables.
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
ViewTracer< Int::BoolView > BoolTracer
Tracer for Boolean variables.
Passing integer arguments.
Passing Boolean variables.
Select values greater than mean of smallest and largest value.
With smallest CHB Q-score divided by domain size.
std::function< int(const Space &home, BoolVar x, int i)> BoolBranchVal
Branch value function type for Boolean variables.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel)
Post propagator for rectangle packing.
union Gecode::@593::NNF::@62 u
Union depending on nodetype t.
Boolean integer variables.
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.
Post propagator for SetVar SetOpType SetVar SetRelType r
Propagator for recording view trace information.
Class represeting a set of tuples.
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
With smallest degree divided by domain size.
IntValBranch INT_VAL_MAX(void)
Select largest value.
IntVarBranch INT_VAR_CHB_MIN(IntCHB c, BranchTbl tbl)
Select variable with lowest CHB Q-score.
IntPropLevel
Propagation levels for integer propagators.
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
Integer view for integer variables.
const int infinity
Infinity for integers.
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Post propagator for SetVar SetOpType SetVar y
Value branching information.
BoolVarBranch BOOL_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
Variable branching information.
std::function< bool(const Space &home, BoolVar x, int i)> BoolBranchFilter
Branch filter function type for Boolean variables.
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Select values not greater than mean of smallest and largest value.
BoolVarBranch BOOL_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
Generic domain change information to be supplied to advisors.
With highest CHB Q-score.
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl)
Select variable with largest min.
IntValBranch INT_VALUES_MAX(void)
Try all values starting from largest.
Select
Which value selection.
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel)
Post propagator that s precedes t in x.
IntVarBranch INT_VAR_ACTION_MIN(double d, BranchTbl tbl)
Select variable with lowest action with decay factor d.
BoolVarBranch BOOL_VAR_ACTION_MAX(double d, BranchTbl tbl)
Select variable with highest action with decay factor d.
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...
Which values to select for assignment.
int n_tuples
Number of Tuples.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Trace delta information for integer variables.
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl)
Select variable with smallest max-regret.
Sort ranges according to increasing minimum.
Domain propagation Options: basic versus advanced propagation.
Select
Which variable selection.
bool valid(int n)
Return whether n is in range.
Value iterator for integer sets.
IntValBranch INT_VAL_MED(void)
Select greatest value not greater than the median.
With smallest action divided by domain size.
IntVarBranch INT_VAR_ACTION_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest action divided by domain size with decay factor d.
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl)
Select variable with smallest max.
Iterator for DFA transitions (sorted by symbols)
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl)
Select variable with largest max-regret.
Random (uniform, for tie breaking)
Select
Which variable selection.
With smallest domain size.
Post propagator for SetVar x
std::ostream & os
Output stream to use.
Select
Which value selection.
BoolVarBranch BOOL_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
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.
IntVarBranch INT_VAR_CHB_MAX(IntCHB c, BranchTbl tbl)
Select variable with largest CHB Q-score.
Recording CHB for Boolean variables.
Select greatest value not greater than the median.
static StdBoolTracer def
Default tracer (printing to std::cerr)
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te, FloatTracer &t)
Create a tracer for float variables.
ViewTraceRecorder< Int::BoolView > BoolTraceRecorder
Trace recorder for Boolean variables.
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &vars, int ss)
Variable sequences in x of size ss are interchangeable.
const long long int llmax
Largest allowed long long integer value.
Traits of arrays in Gecode.
Gecode::Support::BitSetData BitSetData
Import bit set data type.
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
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...
Gecode toplevel namespace
Argument array for variables.
const Range * l
Last range.
Implication for reification.
Class for action management.
BoolVarBranch BOOL_VAR_CHB_MIN(BoolCHB c, BranchTbl tbl)
Select variable with lowest CHB Q-score.
#define GECODE_VTABLE_EXPORT
Range iterator for computing set difference.
BoolVar x
The Boolean control variable.
BoolVarBranch BOOL_VAR_MERIT_MAX(BoolBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl)
Select variable with smallest degree divided by domain size.
Data about values in the table.
unsigned int n
Number of ranges.
#define GECODE_INT_EXPORT
const long long int llinfinity
Infinity for long long integers.
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.
void assign(Home home, const FloatVarArgs &x, FloatAssign fa, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with value selection vals.
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
Home class for posting propagators
double tbl(const Gecode::Space &, double w, double b)
Test function for tie-break limit function.
std::function< double(const Space &home, IntVar x, int i)> IntBranchMerit
Branch merit function type for integer variables.
ReifyMode
Mode for reification.
Select value according to user-defined functions.
ReifyMode rm
The reification mode.
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l...
Trace delta information for Boolean variables.
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntPropLevel ipl)
Post propagators for scheduling tasks on unary resources.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Recording actions for integer variables.
int delta
Delta information.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
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.
std::function< void(Space &home, unsigned int a, BoolVar x, int i, int n)> BoolBranchCommit
Branch commit function type for Boolean variables.
IntVarBranch INT_VAR_ACTION_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest action divided by domain size with decay factor d.
Select all values starting from smallest.
With smallest accumulated failure count divided by domain size.
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...
Equivalence for reification (default)
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.
Reify pmi(BoolVar x)
Use reverse implication for reification.
Boolean view for Boolean variables.
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.