44 #ifndef __GECODE_INT_HH__ 45 #define __GECODE_INT_HH__ 63 #if !defined(GECODE_STATIC_LIBS) && \ 64 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 66 #ifdef GECODE_BUILD_INT 67 #define GECODE_INT_EXPORT __declspec( dllexport ) 69 #define GECODE_INT_EXPORT __declspec( dllimport ) 74 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 75 #define GECODE_INT_EXPORT __attribute__ ((visibility("default"))) 77 #define GECODE_INT_EXPORT 83 #ifndef GECODE_BUILD_INT 84 #define GECODE_LIBRARY_NAME "Int" 101 namespace Gecode {
namespace Int {
112 const int max = INT_MAX - 1;
118 const long long int llmax = LLONG_MAX - 1;
126 bool valid(
long long int n);
128 void check(
int n,
const char*
l);
130 void check(
long long int n,
const char*
l);
134 void positive(
long long int n,
const char*
l);
232 int ranges(
void)
const;
235 int min(
int i)
const;
237 int max(
int i)
const;
239 unsigned int width(
int i)
const;
244 bool in(
int n)
const;
247 unsigned int size(
void)
const;
249 unsigned int width(
void)
const;
271 const IntSet::Range*
i;
273 const IntSet::Range* e;
282 void init(
const IntSet& s);
287 bool operator ()(
void)
const;
290 void operator ++(
void);
300 unsigned int width(
void)
const;
318 void init(
const IntSet& s);
326 template<
class Char,
class Traits>
327 std::basic_ostream<Char,Traits>&
328 operator <<(std::basic_ostream<Char,Traits>& os,
const IntSet& s);
419 unsigned int size(
void)
const;
421 unsigned int width(
void)
const;
423 unsigned int regret_min(
void)
const;
425 unsigned int regret_max(
void)
const;
430 bool range(
void)
const;
433 bool in(
int n)
const;
441 template<
class Char,
class Traits>
442 std::basic_ostream<Char,Traits>&
443 operator <<(std::basic_ostream<Char,Traits>& os,
const IntVar&
x);
458 void init(
const IntVar& x);
475 void init(
const IntVar& x);
541 unsigned int size(
void)
const;
543 unsigned int width(
void)
const;
545 unsigned int regret_min(
void)
const;
547 unsigned int regret_max(
void)
const;
552 bool range(
void)
const;
555 bool in(
int n)
const;
560 bool zero(
void)
const;
563 bool one(
void)
const;
565 bool none(
void)
const;
573 template<
class Char,
class Traits>
574 std::basic_ostream<Char,Traits>&
575 operator <<(std::basic_ostream<Char,Traits>& os,
const BoolVar&
x);
615 IntArgs(
const std::vector<int>& x);
617 template<
class InputIterator>
618 IntArgs(InputIterator first, InputIterator last);
623 IntArgs(
int n,
const int* e);
628 static IntArgs create(
int n,
int start,
int inc=1);
648 template<
class InputIterator>
703 template<
class InputIterator>
2040 Transition(
int i_state0,
int symbol0,
int o_state0);
2055 bool operator ()(
void)
const;
2057 void operator ++(
void);
2059 int i_state(
void)
const;
2061 int symbol(
void)
const;
2063 int o_state(
void)
const;
2076 bool operator ()(
void)
const;
2078 void operator ++(
void);
2080 int val(
void)
const;
2107 int n_states(
void)
const;
2109 int n_transitions(
void)
const;
2111 unsigned int n_symbols(
void)
const;
2113 unsigned int max_degree(
void)
const;
2115 int final_fst(
void)
const;
2117 int final_lst(
void)
const;
2119 int symbol_min(
void)
const;
2121 int symbol_max(
void)
const;
2123 std::size_t hash(
void)
const;
2159 unsigned int width(
void)
const;
2161 const BitSetData* supports(
unsigned int n_words,
int n)
const;
2172 unsigned int start(
int n)
const;
2181 static const int n_initial_free = 1024;
2209 Tuple
get(
int i)
const;
2211 static void set(BitSetData*
d,
unsigned int n);
2213 static bool get(
const BitSetData*
d,
unsigned int n);
2215 unsigned int tuple2idx(Tuple
t)
const;
2217 const Range* fst(
int i)
const;
2219 const Range* lst(
int i)
const;
2222 void finalize(
void);
2227 bool finalized(
void)
const;
2232 virtual ~
Data(
void);
2236 Data& data(
void)
const;
2238 Data& raw(
void)
const;
2266 operator bool(
void)
const;
2281 bool finalized(
void)
const;
2283 void finalize(
void);
2288 int arity(
void)
const;
2291 int tuples(
void)
const;
2293 unsigned int words(
void)
const;
2295 Tuple operator [](
int i)
const;
2297 int min(
void)
const;
2299 int max(
void)
const;
2301 std::size_t hash(
void)
const;
2306 const Range* fst(
int i)
const;
2309 const Range* lst(
int i)
const;
2326 bool operator ()(
void)
const;
2329 void operator ++(
void);
2334 int min(
void)
const;
2337 int max(
void)
const;
2339 unsigned int width(
void)
const;
3902 std::function<
void(
Space& home)>
c,
3907 std::function<
void(
Space& home)>
t,
3908 std::function<
void(
Space& home)> e,
3913 std::function<
void(
Space& home)>
t,
3968 typedef std::function<bool(const Space& home, IntVar x, int i)>
3978 typedef std::function<bool(const Space& home, BoolVar x, int i)>
3990 typedef std::function<double(const Space& home, IntVar x, int i)>
4001 typedef std::function<double(const Space& home, BoolVar x, int i)>
4014 typedef std::function<int(const Space& home, IntVar x, int i)>
4026 typedef std::function<int(const Space& home, BoolVar x, int i)>
4040 typedef std::function<void(
Space& home,
unsigned int a,
4054 typedef std::function<void(
Space& home,
unsigned int a,
4101 void init(
Home home,
const IntVarArgs& x,
double d=1.0,
bool share=
true);
4348 typedef std::function<void(
const Space &home,
const Brancher& b,
4350 BoolVar x,
int i,
const int& n,
4439 Select select(
void)
const;
4487 Select select(
void)
const;
4674 Select select(
void)
const;
4702 Select select(
void)
const;
4785 Select select(
void)
const;
4813 Select select(
void)
const;
4956 template<
class Char,
class Traits>
4957 std::basic_ostream<Char,Traits>&
4958 operator <<(std::basic_ostream<Char,Traits>& os,
const DFA&
d);
4963 template<
class Char,
class Traits>
4964 std::basic_ostream<Char,Traits>&
4965 operator <<(std::basic_ostream<Char,Traits>& os,
const TupleSet& ts);
4972 namespace Int {
namespace LDSB {
4986 void increment(
void);
4988 void decrement(
void);
5204 Int::ViewRanges<Int::IntView> > {
5234 bool operator ()(
void)
const;
5237 void operator ++(
void);
5242 int min(
void)
const;
5245 int max(
void)
const;
5247 unsigned int width(
void)
const;
5283 virtual void init(
const Space& home,
const IntTraceRecorder&
t);
5285 virtual void prune(
const Space& home,
const IntTraceRecorder&
t,
5288 virtual void fix(
const Space& home,
const IntTraceRecorder&
t);
5290 virtual void fail(
const Space& home,
const IntTraceRecorder&
t);
5292 virtual void done(
const Space& home,
const IntTraceRecorder&
t);
5321 virtual void init(
const Space& home,
const BoolTraceRecorder&
t);
5323 virtual void prune(
const Space& home,
const BoolTraceRecorder&
t,
5326 virtual void fix(
const Space& home,
const BoolTraceRecorder&
t);
5328 virtual void fail(
const Space& home,
const BoolTraceRecorder&
t);
5330 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...
IntVarArgs(const VarArray< IntVar > &a)
Initialize from variable array a (copy elements)
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.
BoolVarArgs(const VarArray< BoolVar > &a)
Initialize from variable array a (copy elements)
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.
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.
Argument array for primtive types.
BoolOpType
Operation types for Booleans.
With smallest accumulated failure count.
Which values to select for branching first.
BoolVarArgs(const BoolVarArgs &a)
Initialize from variable argument array a (copy elements)
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.
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 .
BoolVarArgs(const std::vector< BoolVar > &a)
Initialize from vector a.
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...
IntVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
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.
IntVarArgs(const std::vector< IntVar > &a)
Initialize from vector a.
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.
IntVarArgs(int n)
Allocate array with n elements.
ViewTraceRecorder< Int::IntView > IntTraceRecorder
Trace recorder for integer variables.
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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
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.
bool operator!=(const FloatVal &x, const FloatVal &y)
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.
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.
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
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.
IntVarArgs(const IntVarArgs &a)
Initialize from variable argument array a (copy elements)
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.
BoolVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
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.
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.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
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
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
BoolVarArgs(int n)
Allocate array with n elements.
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.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
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.
PrimArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
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.
bool operator==(const FloatVal &x, const FloatVal &y)
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.
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.