Go to the documentation of this file.
38 namespace 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);
Test for domain constraint (range)
Inverse implication for reification.
DomRange(int n)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Implication for reification.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
static Gecode::Support::RandomGenerator rand
Random number generator.
Gecode toplevel namespace
Node * x
Pointer to corresponding Boolean expression node.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &)
Post constraint on x.
Reification specification.
Equivalence for reification (default)
virtual bool solution(const Assignment &) const
Test whether x is solution
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Domain propagation Options: basic versus advanced propagation.
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.
#define GECODE_NEVER
Assert that this command is never executed.
Test for domain constraint (integer)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Base class for assignments
Test for domain constraint (full integer set)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
void fail(void)
Fail space.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
DomDom(int n)
Create and register test.
Test for domain constraint (empty range)
DomInt(int n)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
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.