Go to the documentation of this file.
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) {}
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]) +
"]";
IntRelType
Relation types for integers.
Post propagator for SetVar SetOpType SetVar y
virtual ~Assignment(void)
Destructor.
void reset(void)
Reset iterator.
@ RM_PMI
Inverse implication for reification.
void operator++(void)
Increment to next level.
virtual int operator[](int i) const
Return value for variable i.
virtual int operator[](int i) const
Return value for variable i.
void operator++(void)
Increment to next level.
@ IRT_GQ
Greater or equal ( )
Gecode::IntPropLevel ipl
Propagation level.
void operator++(void)
Increment to next relation type.
Gecode::IntRelType irt(void) const
Return current relation type.
BoolOpTypes(void)
Initialize iterator.
@ IPL_ADVANCED
Use advanced propagation algorithm.
int n
Number of variables.
bool operator()(void) const
Test whether iterator is done.
@ CTL_DOMAIN
Test for domain-consistency.
int randval(const Gecode::IntSet &d)
@ CTL_NONE
No consistency-test.
int a
How many assigments still to be generated.
@ RM_IMP
Implication for reification.
Gecode::IntArgs i(4, 1, 2, 3, 4)
@ IPL_VAL
Value propagation.
const FloatNum min
Smallest allowed float value.
IntPropLevel
Propagation levels for integer propagators.
static Gecode::Support::RandomGenerator rand
Random number generator.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
int val(void) const
Return current value.
Range iterator for integer sets.
unsigned int size(void) const
Return size (cardinality) of set.
virtual int operator[](int i) const
Return value for variable i.
int size(void) const
Return number of variables.
virtual ~CpltAssignment(void)
Destructor.
bool operator()(void) const
Test whether iterator is done.
Gecode toplevel namespace
Base class for all tests to be run
Gecode::IntPropLevel ipl(void) const
Return current level.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
bool operator()(void) const
Test whether iterator is done.
Node * x
Pointer to corresponding Boolean expression node.
BoolOpType
Operation types for Booleans.
IntPropLevels(void)
Initialize iterator.
IntRelTypes(void)
Initialize iterator.
@ RM_EQV
Equivalence for reification (default)
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::IntSetValues * dsv
Iterator for each variable.
bool imp(void) const
Test whether implication as reification mode is supported.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
@ IPL_DOM
Domain propagation Preferences: prefer speed or memory.
int a
How many assigments still to be generated Generate new value according to domain.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
IntPropBasicAdvanced(void)
Initialize iterator.
int * vals
The current values for the variables.
void operator++(void)
Increment to next operation type.
Gecode::BoolOpType bot(void) const
Return current operation type.
virtual ~RandomAssignment(void)
Destructor.
@ IPL_BND
Bounds propagation.
#define GECODE_NEVER
Assert that this command is never executed.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
int * vals
The current values for the variables.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
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.
Base class for assignments
@ IPL_BASIC
Use basic propagation algorithm.
bool reified
Does the constraint also exist as reified constraint.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
bool operator()(void) const
Test whether iterator is done.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual ~RandomMixAssignment(void)
Destructor.
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.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
@ IPL_MEMORY
Prefer to save memory Options: basic versus advanced propagation.
int n
Number of negative literals for node type.
Passing integer arguments.
Gecode::IntSet d
Domain for each variable.
int p
Number of positive literals for node type.
const FloatNum max
Largest allowed float value.
int rms
Which reification modes are supported.
@ IRT_LQ
Less or equal ( )
Gecode::IntPropLevel ipl(void) const
Return current level.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.