42 namespace Test {
namespace Int {
57 :
Test(
"Dom::Int::"+
str(n),n,-4,4,n == 1,
61 for (
int i=x.
size();
i--; )
76 assert(x.
size() == 1);
99 :
Test(
"Dom::Range::"+
str(n),n,-4,4,n == 1,
103 for (
int i=x.
size();
i--; )
104 if ((x[
i] < -2) || (x[
i] > 2))
118 assert(x.
size() == 1);
156 const int r[4][2] = {
157 {-4,-3},{-1,-1},{1,1},{3,5}
166 :
Test(
"Dom::Dom::"+
str(n),n,-6,6,n == 1,
170 for (
int i=x.
size();
i--; )
171 if (!(((x[
i] >= -4) && (x[
i] <= -3)) ||
172 ((x[
i] >= -1) && (x[
i] <= -1)) ||
173 ((x[
i] >= 1) && (x[
i] <= 1)) ||
174 ((x[
i] >= 3) && (x[
i] <= 5))))
188 assert(x.
size() == 1);
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
DomDom(int n)
Create and register test.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
virtual bool solution(const Assignment &x) const
Test whether x is solution
DomInt(int n)
Create and register test.
Inverse implication for reification.
int size(void) const
Return size of array (number of elements)
Test for domain constraint (integer)
ReifyMode mode(void) const
Return reification mode.
int size(void) const
Return number of variables.
Test for domain constraint (full integer set)
static Gecode::Support::RandomGenerator rand
Random number generator.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Test for domain constraint (empty range)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void fail(void)
Fail space.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Reification specification.
virtual bool solution(const Assignment &) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
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
virtual void post(Gecode::Space &home, Gecode::IntVarArray &)
Post constraint on x.
DomRange(int n)
Create and register test.
Node * x
Pointer to corresponding Boolean expression node.
DomRangeEmpty(void)
Create and register test.
Base class for assignments
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Domain propagation Options: basic versus advanced propagation.
BoolVar var(void) const
Return Boolean control variable.
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
Gecode toplevel namespace
Implication for reification.
#define GECODE_NEVER
Assert that this command is never executed.
Test for domain constraint (range)
Equivalence for reification (default)