Go to the documentation of this file.
38 namespace Test {
namespace Int {
81 assert(
x.size() == 2);
125 :
Test(
"Rel::Bool::Var::XY::"+
str(irt0)+
"::"+
str(
n),
n+1,0,1,
150 assert(
x.size() == 2);
166 :
Test(
"Rel::Bool::Var::XX::"+
str(irt0),1,0,1),
215 assert(
x.size() == 1);
254 assert(
x.size() == 1);
276 for (
int i=0;
i<
x.size()-1;
i++)
281 for (
int i=0;
i<
x.size()-1;
i++)
309 for (
int i=0;
i<
x.size()-1;
i++)
315 for (
int i=0;
i<2*
n-1;
i++)
347 for (
int i=0;
i<
x.size()-1;
i++)
352 for (
int i=0;
i<
x.size()-1;
i++)
362 for (
int i=
x.size();
i--; )
376 :
Test(
"Rel::Bool::Seq::Shared::"+
str(
n)+
"::"+
str(irt0),
n,0,1),
383 for (
int i=0;
i<
x.size()-1;
i++)
389 for (
int i=0;
i<2*
n-1;
i++)
414 :
Test(
"Rel::Int::Array::Var::"+
str(irt0),6,-2,2),
irt(irt0) {}
418 for (
int i=0;
i<
n;
i++)
431 for (
int i=0;
i<
n;
i++) {
446 :
Test(
"Rel::Int::Array::Int::"+
str(irt0),3,-2,2),
irt(irt0) {}
451 for (
int i=0;
i<
n;
i++)
473 static const int n = 4;
481 irt(irt0), n_fst(m) {
486 int n_snd =
n - n_fst;
488 if (
x[
i] !=
x[n_fst+
i])
490 return cmp(n_fst,
irt,n_snd);
495 int n_snd =
n - n_fst;
497 for (
int i=0;
i<n_fst;
i++) {
500 for (
int i=0;
i<n_snd;
i++) {
515 :
Test(
"Rel::Bool::Array::Var::"+
str(irt0),10,0,1),
irt(irt0) {}
519 for (
int i=0;
i<
n;
i++)
532 for (
int i=0;
i<
n;
i++) {
547 :
Test(
"Rel::Bool::Array::Int::"+
str(irt0),5,0,1),
irt(irt0) {}
551 for (
int i=0;
i<5;
i++)
565 for (
int i=0;
i<
n;
i++)
579 (void)
new IntVarXY(irts.irt(),1,ipls.ipl());
580 (void)
new IntVarXY(irts.irt(),2,ipls.ipl());
581 (void)
new IntVarXX(irts.irt(),ipls.ipl());
582 (void)
new IntSeq(1,irts.irt(),ipls.ipl());
583 (void)
new IntSeq(2,irts.irt(),ipls.ipl());
584 (void)
new IntSeq(3,irts.irt(),ipls.ipl());
585 (void)
new IntSeq(5,irts.irt(),ipls.ipl());
594 (void)
new BoolSeq(1,irts.irt());
595 (void)
new BoolSeq(2,irts.irt());
596 (void)
new BoolSeq(3,irts.irt());
597 (void)
new BoolSeq(10,irts.irt());
603 for (
int c=-4;
c<=4;
c++) {
604 (void)
new IntInt(irts.irt(),1,
c);
605 (void)
new IntInt(irts.irt(),2,
c);
607 for (
int c=0;
c<=1;
c++) {
613 for (
int n_fst=0; n_fst<=4; n_fst++)
Test for sequence of relations between Boolean variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntRelType
Relation types for integers.
Iterator for integer relation types.
Post propagator for SetVar SetOpType SetVar y
ConTestLevel contest
Whether to test for certain consistency.
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.
@ IRT_GQ
Greater or equal ( )
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntPropLevel ipl
Propagation level.
IntSeq(int n, Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
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.
Passing integer variables.
BoolSharedSeq(int n, Gecode::IntRelType irt0)
Create and register test.
@ CTL_DOMAIN
Test for domain-consistency.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
@ CTL_NONE
No consistency-test.
Test for simple relation involving shared Boolean variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
BoolSeq(int n, Gecode::IntRelType irt0)
Create and register test.
IntArrayDiff(Gecode::IntRelType irt0, int m)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
const FloatNum min
Smallest allowed float value.
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntPropLevel
Propagation levels for integer propagators.
Gecode::IntRelType irt
Integer relation type to propagate.
Test for simple relation involving shared integer variables
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.
Test for relation between same sized arrays of integer variables
int n_fst
How big is the first array.
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)
Post constraint on x.
Gecode::IntRelType irt
Integer relation type to propagate.
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.
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.
IntVarXX(Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
IntSharedSeq(int n, Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
Gecode toplevel namespace
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.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for relation between arrays of Boolean variables and integers
Node * x
Pointer to corresponding Boolean expression node.
Test for simple relation involving integer variable and integer constant
Reification specification.
Passing Boolean variables.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntRelType irt
Integer relation type to propagate.
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.
Boolean integer variables.
BoolVarXX(Gecode::IntRelType irt0)
Create and register test.
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
Test for sequence of relations between integer variables
Test for relation between same sized arrays of integer variables and integers
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Iterator for simple integer propagation levels.
Gecode::IntRelType irt
Integer relation type to propagate.
#define GECODE_NEVER
Assert that this command is never executed.
BoolArrayInt(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Base class for assignments
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Create(void)
Perform creation and registration.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
BoolVarXY(Gecode::IntRelType irt0, int n)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntArrayInt(Gecode::IntRelType irt0)
Create and register test.
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 .
IntInt(Gecode::IntRelType irt0, int n, int c0)
Create and register test.
Test for relation between arrays of Boolean variables
Test for relation between differently sized arrays of integer variables
BoolInt(Gecode::IntRelType irt0, int n, int c0)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for sequence of relations between shared integer variables
IntVarXY(Gecode::IntRelType irt0, int n, Gecode::IntPropLevel ipl)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Test for simple relation involving Boolean variable and integer constant
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for simple relation involving Boolean variables
IntArrayVar(Gecode::IntRelType irt0)
Create and register test.
Test for sequence of relations between shared Boolean variables
Gecode::IntRelType irt
Integer relation type to propagate.
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.
BoolArrayVar(Gecode::IntRelType irt0)
Create and register test.
int n
Number of negative literals for node type.
Passing integer arguments.
Test for simple relation involving integer variables
Gecode::IntArgs i({1, 2, 3, 4})
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.
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.
void rel(Home home, IntVar x, SetRelType rt, SetVar s, Reify r)
Post propagator for .
@ IRT_LQ
Less or equal ( )
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.
Help class to create and register tests.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.