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) {}
182 :
Base(
"Int::"+s), arity(a),
dom(d),
187 testsearch(true), testfix(true) {}
193 :
Base(p+s), arity(a),
dom(min,max),
198 testsearch(true), testfix(true) {}
203 :
Base(
"Int::"+s), arity(a),
dom(min,max),
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]) +
"]";
287 case IRT_EQ:
return x == y;
288 case IRT_NQ:
return x != y;
289 case IRT_LQ:
return x <= y;
290 case IRT_LE:
return x < y;
291 case IRT_GR:
return x > y;
292 case IRT_GQ:
return x >= y;
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.
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.
int size(void) const
Return size of array (number of elements)
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.
Value propagation or consistency (naive)
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual ~RandomAssignment(void)
Destructor.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
bool eqv(void) const
Test whether equivalence as reification mode is supported.
Gecode::IntConLevel icl(void) const
Return current level.
int rms
Which reification modes are supported.
virtual ~CpltAssignment(void)
Destructor.
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.
bool operator()(void) const
Test whether iterator is done.
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.
IntRelTypes(void)
Initialize iterator.
virtual int operator[](int i) const
Return value for variable i.
Base class for all tests to be run
Gecode::IntSetValues * dsv
Iterator for each variable.
bool imp(void) const
Test whether implication as reification mode is supported.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
Test for domain-consistency.
int randval(const Gecode::IntSet &d)
ExtensionalPropKind
Extensional propagation kind.
Gecode::IntRelType irt(void) const
Return current relation type.
unsigned int size(void) const
Return size (cardinality) of set.
bool operator()(void) const
Test whether iterator is done.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
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.
Base class for assignments
IntConLevels(void)
Initialize iterator.
bool operator()(void) const
Test whether iterator is done.
void operator++(void)
Increment to next relation type.
int val(void) const
Return current value.
virtual int operator[](int i) const
Return value for variable i.
Bounds propagation or consistency.
BoolOpTypes(void)
Initialize iterator.
Prefer little memory over speed.
Gecode toplevel namespace
Implication for reification.
virtual int operator[](int i) const
Return value for variable i.
void reset(void)
Reset iterator.
virtual ~Assignment(void)
Destructor.
#define GECODE_NEVER
Assert that this command is never executed.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int size(void) const
Return number of variables.
Domain propagation or consistency.
bool reified
Does the constraint also exist as reified constraint.
Gecode::BoolOpType bot(void) const
Return current operation type.
Equivalence for reification (default)
int * vals
The current values for the variables.