Go to the documentation of this file.
40 namespace Test {
namespace Int {
58 :
Test(
"Count::Int::Int::"+
str(irt0),4,-2,2),
irt(irt0) {}
62 for (
int i=
x.size();
i--; )
81 :
Test(
"Count::Set::Int::"+
str(irt0),4,-2,2),
irt(irt0) {}
85 for (
int i=
x.size();
i--; )
86 if ((
x[
i] >= -1) && (
x[
i] <= 1))
105 :
Test(
"Count::Int::Int::Dup::"+
str(irt0),4,-2,2),
irt(irt0) {}
109 for (
int i=
x.size();
i--; )
117 for (
int i=
x.size();
i--; )
131 :
Test(
"Count::Int::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
135 for (
int i=0;
i<4;
i++)
143 for (
int i=0;
i<4;
i++)
157 :
Test(
"Count::Set::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
161 for (
int i=0;
i<4;
i++)
162 if ((
x[
i] >= -1) && (
x[
i] <= 1))
169 for (
int i=0;
i<4;
i++)
186 :
Test(
"Count::IntArray::Int::"+
str(irt0),5,-2,2),
irt(irt0) {}
190 for (
int i=0;
i<4;
i++)
198 for (
int i=0;
i<4;
i++)
212 :
Test(
"Count::IntArray::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
216 for (
int i=0;
i<4;
i++)
224 for (
int i=0;
i<4;
i++)
238 :
Test(
"Count::Int::Var::Shared::"+
str(irt0),4,-2,2),
irt(irt0) {}
242 for (
int i=0;
i<4;
i++)
268 for (
int i=0;
i<3;
i++)
276 for (
int i=0;
i<3;
i++)
297 for (
int i=0;
i<3;
i++)
305 for (
int i=0;
i<3;
i++)
319 :
Test(
"Count::Var::Var::Shared::A::"+
str(irt0),5,-2,2),
irt(irt0) {}
323 for (
int i=0;
i<4;
i++)
331 for (
int i=0;
i<4;
i++)
345 :
Test(
"Count::Var::Var::Shared::B::"+
str(irt0),5,-2,2),
irt(irt0) {}
349 for (
int i=0;
i<4;
i++)
357 for (
int i=0;
i<4;
i++)
371 :
Test(
"Count::Var::Var::Shared::C::"+
str(irt0),4,-2,2),
irt(irt0) {}
375 for (
int i=0;
i<4;
i++)
392 (void)
new IntInt(irts.irt());
393 (void)
new SetInt(irts.irt());
395 (void)
new IntVar(irts.irt());
396 (void)
new SetVar(irts.irt());
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.
IntRelType
Relation types for integers.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Iterator for integer relation types.
Post propagator for SetVar SetOpType SetVar y
ConTestLevel contest
Whether to test for certain consistency.
Test number of several equal integers equal to integer
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 bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal integers equal to integer with duplicate variables
Gecode::IntPropLevel ipl
Propagation level.
IntVarShared(Gecode::IntRelType irt0)
Create and register test.
Test number of equal variables equal to integer variable with sharing
Gecode::IntRelType irt
Integer relation type to propagate.
Passing integer variables.
VarVarSharedC(Gecode::IntRelType irt0)
Create and register test.
Test number of several equal integers equal to integer variable
@ CTL_NONE
No consistency-test.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntVar(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntInt(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
IntPropLevel
Propagation levels for integer propagators.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::IntRelType irt
Integer relation type to propagate.
Create(void)
Perform creation and registration.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal variables equal to integer variable with sharing
VarVarSharedB(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Test number of equal integers equal to integer
Node * x
Pointer to corresponding Boolean expression node.
Help class to create and register tests.
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntArrayInt(Gecode::IntRelType irt0)
Create and register test.
Test number of equal variables equal to integer variable with sharing
Test number of integers contained in an integer set equal to integer
@ IPL_DOM
Domain propagation Preferences: prefer speed or memory.
VarInt(Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::IntRelType irt
Integer relation type to propagate.
Test number of integers contained in an integer set equal to integer variable
Test number of equal variables equal to integer
VarVarSharedA(Gecode::IntRelType irt0)
Create and register test.
Test number of equal variables equal to integer variable
Test number of equal integers equal to integer variable
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
@ IPL_BND
Bounds propagation.
IntIntDup(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Base class for assignments
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.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
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.
SetInt(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
VarVar(Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Passing integer arguments.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntArgs ints(4, 1, 0, 3, 2)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
SetVar(Gecode::IntRelType irt0)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntArrayVar(Gecode::IntRelType irt0)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal integers equal to integer variable with sharing
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::IntPropLevel ipl)
Map integer propagation level to string.