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);
129 for (
int i=n0;
i--; )
131 for (
int i=n1;
i--; )
142 assert((i>=0) && (i<
n));
176 testsearch(true), testfix(true) {}
216 case IPL_VAL: s <<
"Val";
break;
217 case IPL_BND: s <<
"Bnd";
break;
218 case IPL_DOM: s <<
"Dom";
break;
219 default: s <<
"Def";
break;
272 for (
int i=0;
i<x.
size()-1;
i++)
273 s +=
str(x[
i]) +
",";
274 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.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Gecode::IntPropLevel ipl(void) const
Return current level.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
Inverse implication for reification.
int size(void) const
Return size of array (number of elements)
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.
bool operator()(void) const
Test whether iterator is done.
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.
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 .
Gecode::IntSet dom
Domain of variables.
void operator++(void)
Increment to next level.
virtual int operator[](int i) const
Return value for variable i.
ConTestLevel contest
Whether to test for certain consistency.
int rms
Which reification modes are supported.
virtual ~CpltAssignment(void)
Destructor.
int val(void) const
Return current value.
void operator++(void)
Increment to next level.
int n
Number of variables.
Gecode::IntSet d
Domain for each variable.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
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.
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.
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.
Use basic propagation algorithm.
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.
Use advanced propagation algorithm.
int randval(const Gecode::IntSet &d)
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Gecode::IntPropLevel ipl
Propagation level.
IntPropBasicAdvanced(void)
Initialize iterator.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
bool testfix
Whether to perform fixpoint test.
Prefer to save memory Options: basic versus advanced propagation.
virtual ~RandomMixAssignment(void)
Destructor.
IntPropLevel
Propagation levels for integer propagators.
Post propagator for SetVar SetOpType SetVar y
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.
bool testsearch
Whether to perform search test.
bool operator()(void) const
Test whether iterator is done.
virtual int operator[](int i) const
Return value for variable i.
Base class for assignments
Domain propagation Preferences: prefer speed or memory.
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.
IntPropLevels(void)
Initialize iterator.
BoolOpTypes(void)
Initialize iterator.
Gecode toplevel namespace
Implication for reification.
int arity
Number of variables.
void reset(void)
Reset iterator.
virtual ~Assignment(void)
Destructor.
Gecode::IntPropLevel ipl(void) const
Return current level.
#define GECODE_NEVER
Assert that this command is never executed.
bool reified
Does the constraint also exist as reified constraint.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntPropLevel i=Gecode::IPL_DEF)
Constructor.
bool operator()(void) const
Test whether iterator is done.
Equivalence for reification (default)
int * vals
The current values for the variables.