Go to the documentation of this file.
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++)
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::Var::"+
str(irt0),6,-2,2),
irt(irt0) {}
422 for (
int i=0;
i<
n;
i++)
435 for (
int i=0;
i<
n;
i++) {
450 :
Test(
"Rel::Int::Array::Int::"+
str(irt0),3,-2,2),
irt(irt0) {}
455 for (
int i=0;
i<
n;
i++)
477 static const int n = 4;
485 irt(irt0), n_fst(m) {
490 int n_snd =
n - n_fst;
492 if (
x[
i] !=
x[n_fst+
i])
494 return cmp(n_fst,
irt,n_snd);
499 int n_snd =
n - n_fst;
501 for (
int i=0;
i<n_fst;
i++) {
504 for (
int i=0;
i<n_snd;
i++) {
519 :
Test(
"Rel::Bool::Array::Var::"+
str(irt0),10,0,1),
irt(irt0) {}
523 for (
int i=0;
i<
n;
i++)
536 for (
int i=0;
i<
n;
i++) {
551 :
Test(
"Rel::Bool::Array::Int::"+
str(irt0),5,0,1),
irt(irt0) {}
555 for (
int i=0;
i<5;
i++)
569 for (
int i=0;
i<
n;
i++)
583 (void)
new IntVarXY(irts.irt(),1,ipls.ipl());
584 (void)
new IntVarXY(irts.irt(),2,ipls.ipl());
585 (void)
new IntVarXX(irts.irt(),ipls.ipl());
586 (void)
new IntSeq(1,irts.irt(),ipls.ipl());
587 (void)
new IntSeq(2,irts.irt(),ipls.ipl());
588 (void)
new IntSeq(3,irts.irt(),ipls.ipl());
589 (void)
new IntSeq(5,irts.irt(),ipls.ipl());
598 (void)
new BoolSeq(1,irts.irt());
599 (void)
new BoolSeq(2,irts.irt());
600 (void)
new BoolSeq(3,irts.irt());
601 (void)
new BoolSeq(10,irts.irt());
607 for (
int c=-4;
c<=4;
c++) {
608 (void)
new IntInt(irts.irt(),1,
c);
609 (void)
new IntInt(irts.irt(),2,
c);
611 for (
int c=0;
c<=1;
c++) {
617 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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
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.
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
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.