40 namespace Test {
namespace Int {
60 dsv(new
Gecode::IntSetValues[static_cast<unsigned int>(
n)]) {
70 assert((
i>=0) && (
i<
n));
83 if (it.width() > skip)
84 return it.min() + static_cast<int>(skip);
104 assert((
i>=0) && (
i<
n));
116 if (it.width() > skip)
117 return it.min() + static_cast<int>(skip);
128 :
Assignment(n0+n1,d0),vals(new int[n0+n1]),
a(a0),_n1(n1),_d1(
d1) {
129 for (
int i=n0;
i--; )
131 for (
int i=n1;
i--; )
142 assert((
i>=0) && (
i<
n));
176 testsearch(true), testfix(true) {}
187 testsearch(true), testfix(true) {}
198 testsearch(true), testfix(true) {}
208 testsearch(true), testfix(true) {}
217 default:
return "Def";
229 default:
return "Def";
277 for (
int i=0;
i<
x.size()-1;
i++)
278 s +=
str(
x[
i]) +
",";
279 return "[" + s +
str(
x[
x.size()-1]) +
"]";
RandomMixAssignment(int n0, const Gecode::IntSet &d0, int n1, const Gecode::IntSet &d1, int a0)
Initialize for a assignments for n0 variables and values d0.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
IntConLevel
Consistency levels for integer propagators.
Inverse implication for reification.
Range iterator for integer sets.
const FloatNum max
Largest allowed float value.
virtual int operator[](int i) const
Return value for variable i.
int size(void) const
Return number of variables.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF)
Constructor.
static Gecode::Support::RandomGenerator rand
Random number generator.
int a
How many assigments still to be generated Generate new value according to domain.
BoolOpType
Operation types for Booleans.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
bool imp(void) const
Test whether implication as reification mode is supported.
Value propagation or consistency (naive)
Gecode::BoolOpType bot(void) const
Return current operation type.
bool operator()(void) const
Test whether iterator is done.
virtual ~RandomAssignment(void)
Destructor.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
virtual int operator[](int i) const
Return value for variable i.
int rms
Which reification modes are supported.
virtual ~CpltAssignment(void)
Destructor.
int val(void) const
Return current value.
int n
Number of variables.
Gecode::IntSet d
Domain for each variable.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
int p
Number of positive literals for node type.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Prefer speed over memory consumption.
Gecode::IntConLevel icl
Consistency level.
IntRelType
Relation types for integers.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
int a
How many assigments still to be generated.
void operator++(void)
Increment to next level.
int * vals
The current values for the variables.
Gecode::IntRelType irt(void) const
Return current relation type.
IntRelTypes(void)
Initialize iterator.
unsigned int size(void) const
Return size (cardinality) of set.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Base class for all tests to be run
Gecode::IntSetValues * dsv
Iterator for each variable.
Test for domain-consistency.
int randval(const Gecode::IntSet &d)
virtual bool operator()(void) const
Test whether all assignments have been iterated.
ExtensionalPropKind
Extensional propagation kind.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
virtual ~RandomMixAssignment(void)
Destructor.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
Node * x
Pointer to corresponding Boolean expression node.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
virtual int operator[](int i) const
Return value for variable i.
Base class for assignments
Gecode::IntConLevel icl(void) const
Return current level.
IntConLevels(void)
Initialize iterator.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
void operator++(void)
Increment to next relation type.
Bounds propagation or consistency.
BoolOpTypes(void)
Initialize iterator.
Prefer little memory over speed.
Gecode toplevel namespace
Implication for reification.
void reset(void)
Reset iterator.
virtual ~Assignment(void)
Destructor.
bool operator()(void) const
Test whether iterator is done.
#define GECODE_NEVER
Assert that this command is never executed.
Domain propagation or consistency.
bool reified
Does the constraint also exist as reified constraint.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
bool operator()(void) const
Test whether iterator is done.
Equivalence for reification (default)
int * vals
The current values for the variables.