40 namespace Test {
namespace Int {
57 for (
int i=x.
size();
i--; )
72 assert(x.
size() == 1);
85 for (
int i=x.
size();
i--; )
86 if ((x[
i] < -2) || (x[
i] > 2))
100 assert(x.
size() == 1);
126 const int r[4][2] = {
127 {-4,-3},{-1,-1},{1,1},{3,5}
138 for (
int i=x.
size();
i--; )
139 if (!(((x[
i] >= -4) && (x[
i] <= -3)) ||
140 ((x[
i] >= -1) && (x[
i] <= -1)) ||
141 ((x[
i] >= 1) && (x[
i] <= 1)) ||
142 ((x[
i] >= 3) && (x[
i] <= 5))))
156 assert(x.
size() == 1);
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
DomDom(int n)
Create and register test.
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)
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
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
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
Test for domain constraint (range)