52#ifdef GECODE_HAS_FAULT_INJECTION
58#include <unordered_map>
61#include <initializer_list>
71#if !defined(GECODE_STATIC_LIBS) && \
72 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
74#ifdef GECODE_BUILD_INT
75#define GECODE_INT_EXPORT __declspec( dllexport )
77#define GECODE_INT_EXPORT __declspec( dllimport )
82#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
83#define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
85#define GECODE_INT_EXPORT
91#ifndef GECODE_BUILD_INT
92#define GECODE_LIBRARY_NAME "Int"
109namespace Gecode {
namespace Int {
120 const int max = INT_MAX - 1;
126 const long long int llmax = LLONG_MAX - 1;
134 bool valid(
long long int n);
136 void check(
int n,
const char* l);
138 void check(
long long int n,
const char* l);
140 void positive(
int n,
const char* l);
142 void positive(
long long int n,
const char* l);
169 template<
class I>
class IntSetInit;
195#ifdef GECODE_HAS_FAULT_INJECTION
197 static std::atomic<int> fault_live_objects;
199 static void*
operator new(
size_t s);
201 static void operator delete(
void* p);
223#ifdef GECODE_HAS_FAULT_INJECTION
237 explicit IntSet(
int n,
int m);
239 explicit IntSet(
const int r[],
int n);
245 explicit IntSet(
const int r[][2],
int n);
251 explicit IntSet(
const I& i);
254 explicit IntSet(std::initializer_list<int> r);
261 explicit IntSet(std::initializer_list<std::pair<int,int>> r);
269 int min(
int i)
const;
271 int max(
int i)
const;
273 unsigned int width(
int i)
const;
279 bool in(
int n)
const;
281 unsigned int size(
void)
const;
283 unsigned int width(
void)
const;
313 const IntSet::Range* i;
315 const IntSet::Range* e;
342 unsigned int width(
void)
const;
368 template<
class Char,
class Traits>
369 std::basic_ostream<Char,Traits>&
461 unsigned int size(
void)
const;
463 unsigned int width(
void)
const;
473 bool range(
void)
const;
475 bool in(
int n)
const;
486 template<
class Char,
class Traits>
487 std::basic_ostream<Char,Traits>&
586 unsigned int size(
void)
const;
588 unsigned int width(
void)
const;
598 bool range(
void)
const;
600 bool in(
int n)
const;
606 bool zero(
void)
const;
608 bool one(
void)
const;
610 bool none(
void)
const;
621 template<
class Char,
class Traits>
622 std::basic_ostream<Char,Traits>&
663 IntArgs(
const std::vector<int>& x);
665 IntArgs(std::initializer_list<int> x);
667 template<
class InputIterator>
668 IntArgs(InputIterator first, InputIterator last);
697 template<
class InputIterator>
698 IntVarArgs(InputIterator first, InputIterator last);
755 template<
class InputIterator>
756 BoolVarArgs(InputIterator first, InputIterator last);
2209 bool equal(
const DFA& d)
const;
2220 Transition(
int i_state0,
int symbol0,
int o_state0);
2260 int val(
void)
const;
2302 DFA(
int s, std::initializer_list<Transition> t,
2303 std::initializer_list<int> f,
bool minimize=
true);
2328 std::size_t
hash(
void)
const;
2359 EPK_DENSE_COMPRESSED
2408 unsigned int width(
void)
const;
2428 unsigned int start(
int n)
const;
2519 bool sparse_possible,
bool compressed_possible,
2520 bool support_bits_sparse,
unsigned long long dense_bytes)
const;
2569 operator bool(
void)
const;
2606 int arity(
void)
const;
2610 unsigned int words(
void)
const;
2614 int min(
void)
const;
2616 int max(
void)
const;
2618 std::size_t
hash(
void)
const;
2623 unsigned int sparse_values(
void)
const;
2625 const unsigned int* sparse_tuple_value_ids(
void)
const;
2627 const unsigned int* sparse_support_offsets(
void)
const;
2629 bool support_id(
int p,
int n,
unsigned int& gid)
const;
2631 bool sparse_support(
int p,
int n,
2632 const unsigned int*& b,
2633 const unsigned int*& e,
2634 unsigned int& gid)
const;
2636 bool dense_compressed_support(
int p,
int n,
2673 int min(
void)
const;
2675 int max(
void)
const;
2677 unsigned int width(
void)
const;
2683 namespace Int {
namespace Extensional {
2699 const unsigned int*& b,
2700 const unsigned int*& e,
3545 const IntArgs& c,
bool at_most,
3555 const IntArgs& c,
bool at_most,
3565 const IntArgs& c,
bool at_most,
3575 const IntArgs& c,
bool at_most,
3585 const IntArgs& c,
bool at_most,
3595 const IntArgs& c,
bool at_most,
3605 const IntArgs& c,
bool at_most,
3615 const IntArgs& c,
bool at_most,
4443 std::function<
void(
Space& home)> c,
4448 std::function<
void(
Space& home)> t,
4449 std::function<
void(
Space& home)> e,
4454 std::function<
void(
Space& home)> t,
4509 typedef std::function<bool(
const Space& home, IntVar x,
int i)>
4519 typedef std::function<bool(
const Space& home,
BoolVar x,
int i)>
4531 typedef std::function<double(
const Space& home,
IntVar x,
int i)>
4542 typedef std::function<double(
const Space& home,
BoolVar x,
int i)>
4555 typedef std::function<int(
const Space& home,
IntVar x,
int i)>
4567 typedef std::function<int(
const Space& home,
BoolVar x,
int i)>
4581 typedef std::function<void(
Space& home,
unsigned int a,
4595 typedef std::function<void(
Space& home,
unsigned int a,
4721 bool p=
true,
bool f=
true,
4738 bool p=
true,
bool f=
true,
4772 bool p=
true,
bool f=
true,
4789 bool p=
true,
bool f=
true,
4894 typedef std::function<void(
const Space &home,
const Brancher& b,
4896 IntVar x,
int i,
const int& n,
4901 typedef std::function<void(
const Space &home,
const Brancher& b,
4903 BoolVar x,
int i,
const int& n,
5535 branch(Home home,
const IntVarArgs& x, IntValBranch vals,
5544 branch(Home home,
const BoolVarArgs& x, BoolValBranch vals,
5554 assign(Home home,
const IntVarArgs& x, IntAssign vals,
5563 assign(Home home,
const BoolVarArgs& x, BoolAssign vals,
5576 template<
class Char,
class Traits>
5577 std::basic_ostream<Char,Traits>&
5583 template<
class Char,
class Traits>
5584 std::basic_ostream<Char,Traits>&
5752#ifdef GECODE_HAS_CBS
5876 Int::ViewRanges<Int::IntView> > {
5915 int min(
void)
const;
5917 int max(
void)
const;
5919 unsigned int width(
void)
const;
AFC(void)
Construct as not yet initialized.
Action(void)
Construct as not yet initialized.
Argument array for non-primitive types.
Traits of arrays in Gecode.
Recording AFC information for Boolean variables.
BoolAFC(void)
Construct as not yet initialized.
BoolAFC & operator=(const BoolAFC &a)
Assignment operator.
void init(Home home, const BoolVarArgs &x, double d=1.0, bool share=true)
Initialize for Boolean variables x with decay factor d.
Recording actions for Boolean variables.
BoolAction(Home home, const BoolVarArgs &x, double d=1.0, bool p=true, bool f=true, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x with decay factor d.
BoolAction(void)
Construct as not yet initialized.
BoolAction & operator=(const BoolAction &a)
Assignment operator.
void init(Home home, const BoolVarArgs &x, double d=1.0, bool p=true, bool f=true, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x with decay factor d.
Which values to select for assignment.
Select
Which value selection.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_MIN
Select smallest value.
@ SEL_MAX
Select largest value.
@ SEL_RND
Select random value.
BoolAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Select select(void) const
Return selection strategy.
Select s
Which value to select.
Recording CHB for Boolean variables.
BoolCHB & operator=(const BoolCHB &chb)
Assignment operator.
void init(Home home, const BoolVarArgs &x, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x.
BoolCHB(void)
Construct as not yet initialized.
BoolCHB(Home home, const BoolVarArgs &x, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x.
Trace delta information for Boolean variables.
void operator++(void)
Move iterator to next range (if possible).
int min(void) const
Return smallest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
int max(void) const
Return largest value of range.
BoolTraceDelta(Int::BoolTraceView o, Int::BoolView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
int delta
Delta information.
Which values to select for branching first.
Select s
Which value to select.
Select
Which value selection.
@ SEL_MIN
Select smallest value.
@ SEL_RND
Select random value.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_MAX
Select largest value.
Select select(void) const
Return selection strategy.
BoolValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Passing Boolean variables.
BoolVarArgs(void)
Allocate empty array.
BoolVarArgs(Space &home, int n, int min, int max)
Initialize array with n new variables.
BoolVarArgs & operator=(const BoolVarArgs &)=default
Assignment operator.
BoolVarArray & operator=(const BoolVarArray &)=default
Assignment operator.
BoolVarArray(Space &home, int n, int min, int max)
Initialize array with n new variables.
BoolVarArray(void)
Default constructor (array of size 0).
Which Boolean variable to select for branching.
void expand(Home home, const BoolVarArgs &x)
Expand decay factor into AFC or action.
Select select(void) const
Return selection strategy.
BoolVarBranch(void)
Initialize with strategy SEL_NONE.
Select
Which variable selection.
@ SEL_DEGREE_MIN
With smallest degree.
@ SEL_AFC_MAX
With largest accumulated failure count.
@ SEL_CHB_MIN
With lowest CHB.
@ SEL_MERIT_MIN
With least merit.
@ SEL_ACTION_MIN
With lowest action.
@ SEL_AFC_MIN
With smallest accumulated failure count.
@ SEL_RND
Random (uniform, for tie breaking).
@ SEL_NONE
First unassigned.
@ SEL_ACTION_MAX
With highest action.
@ SEL_CHB_MAX
With highest CHB.
@ SEL_MERIT_MAX
With highest merit.
@ SEL_DEGREE_MAX
With largest degree.
Select s
Which variable to select.
Boolean integer variables.
bool one(void) const
Test whether domain is one.
unsigned int size(void) const
Return size (cardinality) of domain.
int val(void) const
Return assigned value.
bool zero(void) const
Test whether domain is zero.
int max(void) const
Return maximum of domain.
BoolVar(Space &home, int min, int max)
Initialize Boolean variable with range domain.
BoolVar & operator=(const BoolVar &)=default
Assignment operator.
int med(void) const
Return median of domain (greatest element not greater than the median).
friend class BoolVarArray
bool in(int n) const
Test whether n is contained in domain.
BoolVar(void)
Default constructor.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
int min(void) const
Return minimum of domain.
bool none(void) const
Test whether domain is neither zero nor one.
bool range(void) const
Test whether domain is a range.
Base-class for branchers.
CHB(void)
Construct as not yet initialized.
int val(void) const
Return current symbol.
void operator++(void)
Move iterator to next symbol.
bool operator()(void) const
Test whether iterator still at a symbol.
Symbols(const DFA &d)
Initialize to symbols of DFA d.
Specification of a DFA transition.
int o_state
output state Default constructor
Iterator for DFA transitions (sorted by symbols).
int o_state(void) const
Return out-state of current transition.
void operator++(void)
Move iterator to next transition.
bool operator()(void) const
Test whether iterator still at a transition.
Transitions(const DFA &d)
Initialize to all transitions of DFA d.
int i_state(void) const
Return in-state of current transition.
int symbol(void) const
Return symbol of current transition.
Deterministic finite automaton (DFA).
DFA(int s, std::initializer_list< Transition > t, std::initializer_list< int > f, bool minimize=true)
Initialize DFA.
bool operator==(const DFA &d) const
Test whether DFA is equal to d.
int symbol_max(void) const
Return largest symbol in DFA.
unsigned int max_degree(void) const
Return maximal degree (in-degree and out-degree) of any state.
int n_states(void) const
Return the number of states.
int symbol_min(void) const
Return smallest symbol in DFA.
DFA(void)
Initialize for DFA accepting the empty word.
int final_lst(void) const
Return the number of the last final state.
DFA(int s, Transition t[], int f[], bool minimize=true)
Initialize DFA.
int n_transitions(void) const
Return the number of transitions.
unsigned int n_symbols(void) const
Return the number of symbols.
void init(int s, Transition t[], int f[], bool minimize=true)
Initialize DFA.
std::size_t hash(void) const
Return hash key.
bool operator!=(const DFA &d) const
Test whether DFA is not equal to d.
int final_fst(void) const
Return the number of the first final state.
Generic domain change information to be supplied to advisors.
Home class for posting propagators
Recording AFC information for integer variables.
IntAFC(void)
Construct as not yet initialized.
void init(Home home, const IntVarArgs &x, double d=1.0, bool share=true)
Initialize for integer variables x with decay factor d.
IntAFC & operator=(const IntAFC &a)
Assignment operator.
Recording actions for integer variables.
IntAction(Home home, const IntVarArgs &x, double d=1.0, bool p=true, bool f=true, IntBranchMerit bm=nullptr)
Initialize for integer variables x with decay factor d.
void init(Home home, const IntVarArgs &x, double d=1.0, bool p=true, bool f=true, IntBranchMerit bm=nullptr)
Initialize for integer variables x with decay factor d.
IntAction & operator=(const IntAction &a)
Assignment operator.
IntAction(void)
Construct as not yet initialized.
Passing integer arguments.
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
IntArgs(void)
Allocate empty array.
Which values to select for assignment.
Select s
Which value to select.
Select select(void) const
Return selection strategy.
IntAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Select
Which value selection.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_MIN
Select smallest value.
@ SEL_MED
Select greatest value not greater than the median.
@ SEL_RND
Select random value.
@ SEL_MAX
Select largest value.
Recording CHB for integer variables.
IntCHB(void)
Construct as not yet initialized.
IntCHB(Home home, const IntVarArgs &x, IntBranchMerit bm=nullptr)
Initialize for integer variables x.
IntCHB & operator=(const IntCHB &chb)
Assignment operator.
void init(Home home, const IntVarArgs &x, IntBranchMerit bm=nullptr)
Initialize for integer variables x.
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
bool operator()(void) const
Test whether iterator is still at a range or done.
int max(void) const
Return largest value of range.
void operator++(void)
Move iterator to next range (if possible).
void init(const IntSet &s)
Initialize with ranges for set s.
int min(void) const
Return smallest value of range.
IntSetRanges(void)
Default constructor.
void init(const IntSet &s)
Initialize with values for s.
IntSetValues(void)
Default constructor.
int min(void) const
Return minimum of entire set.
unsigned int width(void) const
Return width of set (distance between maximum and minimum).
int min(int i) const
Return minimum of range at position i.
bool in(int n) const
Return whether n is included in the set.
int max(int i) const
Return maximum of range at position i.
int max(void) const
Return maximum of entire set.
friend class IntSetRanges
IntSet(std::initializer_list< std::pair< int, int > > r)
Initialize with ranges from vector r.
int ranges(void) const
Return number of ranges of the specification.
bool operator==(const IntSet &s) const
Return whether s is equal.
unsigned int size(void) const
Return size (cardinality) of set.
IntSet(void)
Initialize as empty set.
static const IntSet empty
Empty set.
bool operator!=(const IntSet &s) const
Return whether s is not equal.
IntSet(std::initializer_list< int > r)
Initialize with integers from list r.
Trace delta information for integer variables.
Int::ViewRanges< Int::IntView > rn
Iterator over the new values.
Iter::Ranges::RangeList ro
Iterator over the old values.
IntTraceDelta(Int::IntTraceView o, Int::IntView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Which values to select for branching first.
Select
Which value selection.
@ SEL_VALUES_MIN
Select all values starting from smallest.
@ SEL_RND
Select random value.
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
@ SEL_MIN
Select smallest value.
@ SEL_MAX
Select largest value.
@ SEL_RANGE_MAX
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
@ SEL_RANGE_MIN
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
@ SEL_VALUES_MAX
Select all values starting from largest.
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
@ SEL_MED
Select greatest value not greater than the median.
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
Select select(void) const
Return selection strategy.
IntValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Select s
Which value to select.
Passing integer variables.
IntVarArgs(void)
Allocate empty array.
IntVarArgs(Space &home, int n, int min, int max)
Initialize array with n new variables.
IntVarArgs(Space &home, int n, const IntSet &s)
Initialize array with n new variables.
IntVarArgs & operator=(const IntVarArgs &)=default
Assignment operator.
IntVarArray & operator=(const IntVarArray &)=default
Assignment operator.
IntVarArray(void)
Default constructor (array of size 0).
IntVarArray(Space &home, int n, int min, int max)
Initialize array with n new variables.
IntVarArray(Space &home, int n, const IntSet &s)
Initialize array with n new variables.
Which integer variable to select for branching.
void expand(Home home, const IntVarArgs &x)
Expand AFC, action, and CHB.
Select
Which variable selection.
@ SEL_MAX_MIN
With smallest max.
@ SEL_CHB_MAX
With highest CHB Q-score.
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
@ SEL_MIN_MIN
With smallest min.
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
@ SEL_REGRET_MIN_MIN
With smallest min-regret.
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
@ SEL_MIN_MAX
With largest min.
@ SEL_REGRET_MIN_MAX
With largest min-regret.
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
@ SEL_MAX_MAX
With largest max.
@ SEL_AFC_MIN
With smallest accumulated failure count.
@ SEL_SIZE_MIN
With smallest domain size.
@ SEL_AFC_MAX
With largest accumulated failure count.
@ SEL_MERIT_MAX
With highest merit.
@ SEL_DEGREE_MAX
With largest degree.
@ SEL_SIZE_MAX
With largest domain size.
@ SEL_ACTION_MIN
With lowest action.
@ SEL_ACTION_MAX
With highest action.
@ SEL_CHB_MIN
With lowest CHB Q-score.
@ SEL_RND
Random (uniform, for tie breaking).
@ SEL_NONE
First unassigned.
@ SEL_MERIT_MIN
With least merit.
@ SEL_REGRET_MAX_MIN
With smallest max-regret.
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
@ SEL_DEGREE_MIN
With smallest degree.
@ SEL_REGRET_MAX_MAX
With largest max-regret.
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
Select s
Which variable to select.
Select select(void) const
Return selection strategy.
IntVarBranch(void)
Initialize with strategy SEL_NONE.
IntVarRanges(void)
Default constructor.
void init(const IntVar &x)
Initialize with ranges for integer variable x.
IntVarValues(void)
Default constructor.
void init(const IntVar &x)
Initialize with values x.
unsigned int size(void) const
Return size (cardinality) of domain.
IntVar & operator=(const IntVar &)=default
Assignment operator.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
int min(void) const
Return minimum of domain.
IntVar(Space &home, const IntSet &d)
Initialize variable with arbitrary domain.
int val(void) const
Return assigned value.
IntVar(void)
Default constructor.
bool in(int n) const
Test whether n is contained in domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
bool range(void) const
Test whether domain is a range.
IntVar(Space &home, int min, int max)
Initialize variable with range domain.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
int med(void) const
Return median of domain (greatest element not greater than the median).
int max(void) const
Return maximum of domain.
Duplicate of a Boolean view.
Boolean variable implementation.
Boolean view for Boolean variables.
Internal access to finalized tuple-set support representations.
static bool dense_compressed_support(const TupleSet &ts, int p, int n, const TupleSet::CSupportWord *&b, const TupleSet::CSupportWord *&e)
Return compressed support words for position/value.
static bool support_id(const TupleSet &ts, int p, int n, unsigned int &gid)
Return support id for position/value.
static unsigned int sparse_values(const TupleSet &ts)
Return number of sparse support values.
static bool sparse_support(const TupleSet &ts, int p, int n, const unsigned int *&b, const unsigned int *&e, unsigned int &gid)
Return sparse support tuple id range for position/value.
static const unsigned int * sparse_support_offsets(const TupleSet &ts)
Return sparse support offsets.
static const unsigned int * sparse_tuple_value_ids(const TupleSet &ts)
Return tuple-value sparse ids.
Duplicate of an integer view.
Range iterator for ranges of integer variable implementation.
Integer variable implementation.
Integer view for integer variables.
Implementation of a symmetry at the modelling level.
Range iterator for integer views.
Range iterator for computing set difference.
Range iterator for range lists
Value iterator from range iterator.
Reification specification.
BoolVar x
The Boolean control variable.
BoolVar var(void) const
Return Boolean control variable.
Reify(void)
Default constructor without proper initialization.
ReifyMode mode(void) const
Return reification mode.
ReifyMode rm
The reification mode.
Shared array with arbitrary number of elements.
SharedHandle(void)
Create shared handle with no object pointing to.
virtual void prune(const Space &home, const BoolTraceRecorder &t, const ViewTraceInfo &vti, int i, BoolTraceDelta &d)
Print prune information.
virtual void init(const Space &home, const BoolTraceRecorder &t)
Print init information.
std::ostream & os
Output stream to use.
virtual void fix(const Space &home, const BoolTraceRecorder &t)
Print fixpoint information.
static StdBoolTracer def
Default tracer (printing to std::cerr).
virtual void fail(const Space &home, const BoolTraceRecorder &t)
Print failure information.
StdBoolTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0.
virtual void done(const Space &home, const BoolTraceRecorder &t)
Print that trace recorder is done.
virtual void prune(const Space &home, const IntTraceRecorder &t, const ViewTraceInfo &vti, int i, IntTraceDelta &d)
Print prune information.
virtual void fail(const Space &home, const IntTraceRecorder &t)
Print failure information.
virtual void done(const Space &home, const IntTraceRecorder &t)
Print that trace recorder is done.
StdIntTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0 and events \ e.
std::ostream & os
Output stream to use.
virtual void fix(const Space &home, const IntTraceRecorder &t)
Print fixpoint information.
virtual void init(const Space &home, const IntTraceRecorder &t)
Print init information.
static StdIntTracer def
Default tracer (printing to std::cerr).
Collection of symmetries.
A reference-counted pointer to a SymmetryObject.
SymmetryHandle(const SymmetryHandle &h)
Copy constructor.
SymmetryHandle(Int::LDSB::SymmetryObject *o)
Initialies with a SymmetryObject.
SymmetryHandle(void)
Default constructor.
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
void decrement(void)
Decrement counter.
const SymmetryHandle & operator=(const SymmetryHandle &h)
Assignment operator.
void increment(void)
Increment counter.
~SymmetryHandle(void)
Destructor.
Combine variable selection criteria for tie-breaking.
Compressed support data for one tuple-word block.
unsigned int widx
Word index in tuple-word array.
BitSetData bits
Support bits in that word.
State select_state(ExtensionalPropKind epk, bool dense_possible, bool sparse_possible, bool compressed_possible, bool support_bits_sparse, unsigned long long dense_bytes) const
Select the finalized state for the computed table layout.
void clear_support(void)
Release partially or fully constructed support data.
unsigned int compressed_n_entries
Number of compressed support entries.
int n_free
Number of free tuple entries of arity.
bool terminal(void) const
Is datastructure no longer mutable.
unsigned int * sparse_tuples
Sparse support tuple ids (size arity*n_tuples).
void resize(void)
Resize tuple data.
BitSetData * support
Pointer to all support data.
Data(int a)
Initialize as empty tuple set with arity a.
unsigned int * compressed_offsets
Compressed support offsets (size n_vals+1).
unsigned int n_words
Number of words for support.
bool failed(void) const
Has finalization failed.
static void set(BitSetData *d, unsigned int n)
Set bit n in bitset data d.
unsigned int * sparse_offsets
Sparse support offsets (size sparse_n_vals+1).
void finalize(void)
Finalize datastructure (disallows additions of more Tuples).
int n_tuples
Number of Tuples.
unsigned int sparse_n_vals
Number of sparse support values.
Tuple get(int i) const
Return tuple with number i.
unsigned int * sparse_tv
Tuple cell to sparse support id map (size arity*n_tuples).
State state
Tuple set lifecycle state and finalized representation.
CSupportWord * compressed_words
Compressed support words (size compressed_n_entries).
unsigned int tuple2idx(Tuple t) const
Map tuple address to index.
State
Tuple set lifecycle state and finalized representation.
Range * range
Pointer to all ranges.
const Range * lst(int i) const
Return last range for position i.
bool finalized(void) const
Is datastructure finalized.
void finalize(ExtensionalPropKind epk)
Finalize datastructure (disallows additions of more Tuples).
virtual ~Data(void)
Delete implementation.
State empty_state(ExtensionalPropKind epk) const
Select the state for an empty finalized tuple set.
ValueData * vd
Value data.
const Range * fst(int i) const
Return first range for position i.
static const int n_initial_free
Initial number of free tuples.
Tuple add(void)
Return newly added tuple.
unsigned int * range_base
Pointer to all range support ids.
BitSetData * s
Begin of supports.
unsigned int width(void) const
Return the width.
const BitSetData * supports(unsigned int n_words, int n) const
Return the dense supports for value n.
bool operator()(void) const
Test whether iterator is still at a range.
Ranges(const TupleSet &ts, int i)
Initialize for column i.
int max(void) const
Return largest value of range.
const Range * l
Last range.
int min(void) const
Return smallest value of range.
void operator++(void)
Move iterator to next range (if possible).
const Range * c
Current range.
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Data about values in the table.
unsigned int start(int n) const
Find start range for value n.
unsigned int n
Number of ranges.
unsigned int * base
Base support id for each range (sparse and compressed only).
Class representing a set of tuples.
TupleSet(void)
Construct an uninitialized tuple set.
bool failed(void) const
Has tuple-set finalization failed.
void _add(const IntArgs &t)
Add tuple t to tuple set.
int tuples(void) const
Number of tuples.
TupleSet(int a, const DFA &dfa, ExtensionalPropKind epk)
Initialize with DFA dfa for arity a and representation epk.
int max(void) const
Return maximal value in all tuples.
bool operator!=(const TupleSet &t) const
Test whether tuple set is different from t.
bool finalized(void) const
Is tuple set successfully finalized.
TupleSet(int a)
Initialize for a tuple set with arity a.
ExtensionalPropKind representation(void) const
Return materialized tuple-set representation.
TupleSet & add(const IntArgs &t)
Add tuple t to tuple set.
bool operator==(const TupleSet &t) const
Test whether tuple set is equal to t.
TupleSet & operator=(const TupleSet &t)
Assignment operator.
Tuple operator[](int i) const
Get tuple i.
const Range * lst(int i) const
Return last range for position i.
int * Tuple
Type of a tuple.
std::size_t hash(void) const
Return hash key.
void finalize(void)
Finalize tuple set with dense support data.
bool equal(const TupleSet &t) const
Test whether tuple set is equal to t.
TupleSet(int a, const DFA &dfa)
Initialize with DFA dfa for arity a using dense supports.
TupleSet(const TupleSet &t)
Initialize by TupleSet t (tuple set is shared).
const Range * fst(int i) const
Return first range for position i.
unsigned int words(void) const
Return number of required bit set words.
int min(void) const
Return minimal value in all tuples.
Data & raw(void) const
Get raw data (must be initialized).
Gecode::Support::BitSetData BitSetData
Import bit set data type.
Data & data(void) const
Get data (must be initialized and finalized).
void init(int a)
Initialize an uninitialized tuple set.
int arity(void) const
Arity of tuple set.
Propagator for recording view trace information.
Tracer that process view trace information.
#define GECODE_INT_EXPORT
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te=(TE_INIT|TE_PRUNE|TE_FIX|TE_FAIL|TE_DONE), FloatTracer &t=StdFloatTracer::def)
Create a tracer for float variables.
ViewTraceRecorder< Int::IntView > IntTraceRecorder
Trace recorder for integer variables.
ViewTraceRecorder< Int::BoolView > BoolTraceRecorder
Trace recorder for Boolean variables.
ViewTracer< Int::IntView > IntTracer
Tracer for integer variables.
ViewTracer< Int::BoolView > BoolTracer
Tracer for Boolean variables.
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
void assign(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatAssign vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Assign all x with variable selection vars and value selection vals.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntPropLevel ipl=IPL_DEF)
Post propagator for bin packing.
std::function< double(const Space &home, IntVar x, int i)> IntBranchMerit
Branch merit function type for integer variables.
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
std::function< bool(const Space &home, BoolVar x, int i)> BoolBranchFilter
Branch filter function type for Boolean variables.
std::function< int(const Space &home, BoolVar x, int i)> BoolBranchVal
Branch value function type for Boolean variables.
std::function< double(const Space &home, BoolVar x, int i)> BoolBranchMerit
Branch merit function type for Boolean variables.
std::function< int(const Space &home, IntVar x, int i)> IntBranchVal
Branch value function type for integer variables.
std::function< void(Space &home, unsigned int a, BoolVar x, int i, int n)> BoolBranchCommit
Branch commit function type for Boolean variables.
std::function< void(Space &home, unsigned int a, IntVar x, int i, int n)> IntBranchCommit
Branch commit function type for integer variables.
ExtensionalPropKind
Support representation selection for extensional tuple sets.
void extensional(Home home, const IntVarArgs &x, DFA d, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for extensional constraint described by a DFA.
@ EPK_AUTO
Select dense or compressed representation automatically.
@ EPK_DENSE
Use dense support representation.
@ EPK_SPARSE
Use sparse support representation.
@ EPK_DENSE_COMPRESSED
Use compressed dense support representation.
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel ipl=IPL_DEF)
Post propagator for rectangle packing.
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel=IPL_DEF)
Post propagator that s precedes t in x.
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, BoolVar z, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
Reify imp(BoolVar x)
Use implication for reification.
IntRelType
Relation types for integers.
Reify eqv(BoolVar x)
Use equivalence for reification.
TaskType
Type of task for scheduling constraints.
ReifyMode
Mode for reification.
BoolOpType
Operation types for Booleans.
Reify pmi(BoolVar x)
Use reverse implication for reification.
IntPropLevel
Propagation levels for integer propagators.
ArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
@ IRT_GQ
Greater or equal ( ).
@ IRT_LQ
Less or equal ( ).
@ RM_IMP
Implication for reification.
@ RM_PMI
Inverse implication for reification.
@ RM_EQV
Equivalence for reification (default).
@ IPL_BITS_
Number of bits required (internal).
@ IPL_BASIC
Use basic propagation algorithm.
@ IPL_BASIC_ADVANCED
Use both.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_FULL
Use full propagation.
@ IPL_VAL
Value propagation.
@ IPL_ADVANCED
Use advanced propagation algorithm.
@ IPL_DEF
Simple propagation levels.
@ IPL_BND
Bounds propagation.
@ TE_INIT
Trace init events.
@ TE_PRUNE
Trace prune events.
@ TE_FIX
Trace fixpoint events.
@ TE_FAIL
Trace fail events.
@ TE_DONE
Trace done events.
Symmetry breaking for integer variables.
Numerical limits for integer variables.
const long long int llmin
Smallest allowed long long integer value.
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l.
const long long int llmax
Largest allowed long long integer value.
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
const int infinity
Infinity for integers.
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
const int min
Smallest allowed integer value.
bool valid(int n)
Return whether n is in range.
const int max
Largest allowed integer value.
const long long int llinfinity
Infinity for long long integers.
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Gecode toplevel namespace
ArgArray< IntSet > IntSetArgs
Passing set arguments.
BoolVarBranch BOOL_VAR_CHB_MIN(BoolCHB c, BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
SymmetryHandle ValueSymmetry(const IntArgs &v)
Values in v are interchangeable.
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
SymmetryHandle ValueSequenceSymmetry(const IntArgs &v, int ss)
Value sequences in v of size ss are interchangeable.
BoolAssign BOOL_ASSIGN_MAX(void)
Select largest value.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel ipl=IPL_DEF)
Post propagator for .
IntValBranch INT_VAL_RANGE_MIN(void)
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
IntValBranch INT_VAL_RANGE_MAX(void)
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
BoolValBranch BOOL_VAL(BoolBranchVal v, BoolBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
IntValBranch INT_VALUES_MAX(void)
Try all values starting from largest.
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
IntVarBranch INT_VAR_CHB_SIZE_MIN(IntCHB c, BranchTbl tbl=nullptr)
Select variable with smallest CHB Q-score divided by domain size.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void order(Home home, IntVar s0, int p0, IntVar s1, int p1, BoolVar b, IntPropLevel ipl=IPL_DEF)
Post propagators for ordering two tasks.
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min-regret.
IntVarBranch INT_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
IntValBranch INT_VAL_MED(void)
Select greatest value not greater than the median.
IntValBranch INT_VAL(IntBranchVal v, IntBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
Archive & operator<<(Archive &e, FloatNumBranch nl)
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF)
Post propagator that y is x sorted in increasing order.
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min-regret.
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator for for all .
IntVarBranch INT_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest action divided by domain size with decay factor d.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
BoolValBranch BOOL_VAL_MIN(void)
Select smallest value.
BoolVarBranch BOOL_VAR_MERIT_MIN(BoolBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
IntRelType neg(IntRelType irt)
Return negated relation type of irt.
IntVarBranch INT_VAR_CHB_MIN(IntCHB c, BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
BoolVarBranch BOOL_VAR_NONE(void)
Select first unassigned variable.
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void element(Home home, IntSharedArray n, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
IntVarBranch INT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
IntVarBranch INT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max-regret.
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
Post propagator for .
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
IntVarBranch INT_VAR_CHB_MAX(IntCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score.
IntValBranch INT_VAL_MAX(void)
Select largest value.
BoolValBranch BOOL_VAL_MAX(void)
Select largest value.
BoolVarBranch BOOL_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
BoolVarBranch BOOL_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
void when(Home home, BoolVar x, std::function< void(Space &home)> t, std::function< void(Space &home)> e, IntPropLevel ipl=IPL_DEF)
Execute t (then) when x is assigned one, and e (else) otherwise.
void cumulative(Home home, int c, const TaskTypeArgs &t, const IntVarArgs &flex, const IntArgs &fix, const IntArgs &u, IntPropLevel ipl=IPL_DEF)
Post propagators for scheduling tasks on cumulative resources.
BoolVarBranch BOOL_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
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 ipl=IPL_DEF)
Post propagators for the cumulatives constraint.
BoolAssign BOOL_ASSIGN_RND(Rnd r)
Select random 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.
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
SymmetryHandle VariableSymmetry(const IntVarArgs &x)
Variables in x are interchangeable.
IntAssign INT_ASSIGN_MED(void)
Select greatest value not greater than the median.
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
BoolVarBranch BOOL_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
BoolVarBranch BOOL_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
BoolAssign BOOL_ASSIGN(BoolBranchVal v, BoolBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
BoolVarBranch BOOL_VAR_CHB_MAX(BoolCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score.
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max.
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
IntAssign INT_ASSIGN_MIN(void)
Select smallest value.
IntVarBranch INT_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
IntVarBranch INT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
IntVarBranch INT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count divided by domain size with decay factor d.
void unshare(Home home, IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Replace multiple variable occurrences in x by fresh variables.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &x, int ss)
Variable sequences in x of size ss are interchangeable.
BoolValBranch BOOL_VAL_RND(Rnd r)
Select random value.
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max-regret.
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
IntVarBranch INT_VAR_CHB_SIZE_MAX(IntCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score divided by domain size.
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel ipl=IPL_DEF)
Post propagator for .
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree divided by domain size.
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntPropLevel ipl=IPL_DEF)
Post propagators for scheduling tasks on unary resources.
void member(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
void circuit(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a circuit.
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest domain size.
BoolVarBranch BOOL_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
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_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest action divided by domain size with decay factor d.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for .
BoolVarBranch BOOL_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
BoolAssign BOOL_ASSIGN_MIN(void)
Select smallest value.
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min.
BoolVarBranch BOOL_VAR_MERIT_MAX(BoolBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree divided by domain size.
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min.
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest domain size.
IntValBranch INT_VAL_RND(Rnd r)
Select random value.
#define GECODE_VTABLE_EXPORT