38namespace Test {
namespace Int {
57 for (
int i=
x.
size(); i--; )
72 assert(
x.size() == 1);
99 for (
int i=
x.
size(); i--; )
100 if ((
x[i] < -2) || (
x[i] > 2))
114 assert(
x.size() == 1);
152 const int r[4][2] = {
153 {-4,-3},{-1,-1},{1,1},{3,5}
166 for (
int i=
x.
size(); i--; )
167 if (!(((
x[i] >= -4) && (
x[i] <= -3)) ||
168 ((
x[i] >= -1) && (
x[i] <= -1)) ||
169 ((
x[i] >= 1) && (
x[i] <= 1)) ||
170 ((
x[i] >= 3) && (
x[i] <= 5))))
184 assert(
x.size() == 1);
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
int size(void) const
Return size of array (number of elements)
Reification specification.
static Gecode::Support::RandomGenerator rand
Random number generator.
Base class for assignments
Test for domain constraint (full integer set)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
virtual bool solution(const Assignment &x) const
Test whether x is solution
DomDom(int n)
Create and register test.
Test for domain constraint (integer)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
DomInt(int n)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for domain constraint (empty range)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &)
Post constraint on x.
virtual bool solution(const Assignment &) const
Test whether x is solution
DomRangeEmpty(void)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Test for domain constraint (range)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
virtual bool solution(const Assignment &x) const
Test whether x is solution
DomRange(int n)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
void fail(void)
Fail space.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
@ RM_IMP
Implication for reification.
@ RM_PMI
Inverse implication for reification.
@ RM_EQV
Equivalence for reification (default)
Gecode toplevel namespace
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
#define GECODE_NEVER
Assert that this command is never executed.