42 namespace Test {
namespace Int {
85 assert(
x.size() == 2);
129 :
Test(
"Rel::Bool::Var::XY::"+
str(irt0)+
"::"+
str(
n),
n+1,0,1,
154 assert(
x.size() == 2);
170 :
Test(
"Rel::Bool::Var::XX::"+
str(irt0),1,0,1),
219 assert(
x.size() == 1);
258 assert(
x.size() == 1);
280 for (
int i=0;
i<
x.size()-1;
i++)
285 for (
int i=0;
i<
x.size()-1;
i++)
313 for (
int i=0;
i<
x.size()-1;
i++)
319 for (
int i=0;
i<2*
n-1;
i++)
331 y[
i] = y[
n+
i] =
x[
i];
351 for (
int i=0;
i<
x.size()-1;
i++)
356 for (
int i=0;
i<
x.size()-1;
i++)
366 for (
int i=
x.size();
i--; )
380 :
Test(
"Rel::Bool::Seq::Shared::"+
str(
n)+
"::"+
str(irt0),
n,0,1),
387 for (
int i=0;
i<
x.size()-1;
i++)
393 for (
int i=0;
i<2*
n-1;
i++)
418 :
Test(
"Rel::Int::Array::"+
str(irt0),6,-2,2),
irt(irt0) {}
422 for (
int i=0;
i<
n;
i++)
435 for (
int i=0;
i<
n;
i++) {
448 static const int n = 4;
456 irt(irt0), n_fst(m) {
461 int n_snd =
n - n_fst;
463 if (
x[
i] !=
x[n_fst+
i])
465 return cmp(n_fst,
irt,n_snd);
470 int n_snd =
n - n_fst;
472 for (
int i=0;
i<n_fst;
i++) {
475 for (
int i=0;
i<n_snd;
i++) {
490 :
Test(
"Rel::Bool::Array::"+
str(irt0),10,0,1),
irt(irt0) {}
494 for (
int i=0;
i<
n;
i++)
507 for (
int i=0;
i<
n;
i++) {
522 (void)
new IntVarXY(irts.irt(),1,icls.icl());
523 (void)
new IntVarXY(irts.irt(),2,icls.icl());
524 (void)
new IntVarXX(irts.irt(),icls.icl());
525 (void)
new IntSeq(1,irts.irt(),icls.icl());
526 (void)
new IntSeq(2,irts.irt(),icls.icl());
527 (void)
new IntSeq(3,irts.irt(),icls.icl());
528 (void)
new IntSeq(5,irts.irt(),icls.icl());
537 (void)
new BoolSeq(1,irts.irt());
538 (void)
new BoolSeq(2,irts.irt());
539 (void)
new BoolSeq(3,irts.irt());
540 (void)
new BoolSeq(10,irts.irt());
546 for (
int c=-4;
c<=4;
c++) {
547 (void)
new IntInt(irts.irt(),1,
c);
548 (void)
new IntInt(irts.irt(),2,
c);
550 for (
int c=0;
c<=1;
c++) {
555 for (
int n_fst=0; n_fst<=4; n_fst++)
Test for relation between same sized arrays of integer variables
Test for relation between arrays of Boolean variables
Test for relation between differently sized arrays of integer variables
BoolVarXY(Gecode::IntRelType irt0, int n)
Create and register test.
BoolVarXX(Gecode::IntRelType irt0)
Create and register test.
IntSharedSeq(int n, Gecode::IntRelType irt0, Gecode::IntConLevel icl)
Create and register test.
IntConLevel
Consistency levels for integer propagators.
virtual bool solution(const Assignment &x) const
Test whether x is solution
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
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.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Help class to create and register tests.
IntVarXX(Gecode::IntRelType irt0, Gecode::IntConLevel icl)
Create and register test.
struct Gecode::@511::NNF::@54::@55 b
For binary nodes (and, or, eqv)
Create(void)
Perform creation and registration.
Iterator for integer consistency levels.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
BoolSeq(int n, Gecode::IntRelType irt0)
Create and register test.
Test for simple relation involving integer variables
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
ConTestLevel contest
Whether to test for certain consistency.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
IntInt(Gecode::IntRelType irt0, int n, int c0)
Create and register test.
BoolSharedSeq(int n, Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
Test for sequence of relations between shared Boolean variables
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.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntConLevel icl
Consistency level.
void rel(Home home, IntVar x, SetRelType rt, SetVar s, Reify r)
Post propagator for .
IntRelType
Relation types for integers.
IntArray(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Iterator for integer relation types.
Test for simple relation involving shared integer variables
Reification specification.
Gecode::IntRelType irt
Integer relation type to propagate.
Test for simple relation involving shared Boolean variables
Test for simple relation involving Boolean variable and integer constant
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-consistency.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
int n_fst
How big is the first array.
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.
Passing integer variables.
Passing Boolean variables.
Test for sequence of relations between shared integer variables
Gecode::IntRelType irt
Integer relation type to propagate.
Boolean integer variables.
Gecode::IntRelType irt
Integer relation type to propagate.
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
IntSeq(int n, Gecode::IntRelType irt0, Gecode::IntConLevel icl)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Node * x
Pointer to corresponding Boolean expression node.
Test for sequence of relations between Boolean variables
Base class for assignments
Test for simple relation involving Boolean variables
BoolArray(Gecode::IntRelType irt0)
Create and register test.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Gecode::IntRelType irt
Integer relation type to propagate.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntVarXY(Gecode::IntRelType irt0, int n, Gecode::IntConLevel icl)
Create and register test.
Gecode toplevel namespace
Test for simple relation involving integer variable and integer constant
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.
BoolInt(Gecode::IntRelType irt0, int n, int c0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Test for sequence of relations between integer variables
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
IntArrayDiff(Gecode::IntRelType irt0, int m)
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
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 bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution