40 namespace Test {
namespace Int {
55 :
Test(
"Dom::Int::"+
str(n),n,-4,4,n == 1,
59 for (
int i=x.
size();
i--; )
74 assert(x.
size() == 1);
85 :
Test(
"Dom::Range::"+
str(n),n,-4,4,n == 1,
89 for (
int i=x.
size();
i--; )
90 if ((x[
i] < -2) || (x[
i] > 2))
104 assert(x.
size() == 1);
130 const int r[4][2] = {
131 {-4,-3},{-1,-1},{1,1},{3,5}
140 :
Test(
"Dom::Dom::"+
str(n),n,-6,6,n == 1,
144 for (
int i=x.
size();
i--; )
145 if (!(((x[
i] >= -4) && (x[
i] <= -3)) ||
146 ((x[
i] >= -1) && (x[
i] <= -1)) ||
147 ((x[
i] >= 1) && (x[
i] <= 1)) ||
148 ((x[
i] >= 3) && (x[
i] <= 5))))
162 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.
int size(void) const
Return size of array (number of elements)
Test for domain constraint (integer)
int size(void) const
Return number of variables.
Test for domain constraint (full integer set)
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
Domain propagation Preferences: prefer speed or memory.
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
Test for domain constraint (range)