36namespace Test {
namespace Int {
54 :
Test(
"Count::Int::Int::"+
str(irt0),4,-2,2),
irt(irt0) {}
58 for (
int i=
x.
size(); i--; )
77 :
Test(
"Count::Set::Int::"+
str(irt0),4,-2,2),
irt(irt0) {}
81 for (
int i=
x.
size(); i--; )
82 if ((
x[i] >= -1) && (
x[i] <= 1))
101 :
Test(
"Count::Int::Int::Dup::"+
str(irt0),4,-2,2),
irt(irt0) {}
105 for (
int i=
x.
size(); i--; )
113 for (
int i=
x.
size(); i--; )
127 :
Test(
"Count::Int::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
131 for (
int i=0; i<4; i++)
139 for (
int i=0; i<4; i++)
153 :
Test(
"Count::Set::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
157 for (
int i=0; i<4; i++)
158 if ((
x[i] >= -1) && (
x[i] <= 1))
165 for (
int i=0; i<4; i++)
182 :
Test(
"Count::IntArray::Int::"+
str(irt0),5,-2,2),
irt(irt0) {}
186 for (
int i=0; i<4; i++)
194 for (
int i=0; i<4; i++)
208 :
Test(
"Count::IntArray::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
212 for (
int i=0; i<4; i++)
220 for (
int i=0; i<4; i++)
234 :
Test(
"Count::Int::Var::Shared::"+
str(irt0),4,-2,2),
irt(irt0) {}
238 for (
int i=0; i<4; i++)
264 for (
int i=0; i<3; i++)
272 for (
int i=0; i<3; i++)
293 for (
int i=0; i<3; i++)
301 for (
int i=0; i<3; i++)
315 :
Test(
"Count::Var::Var::Shared::A::"+
str(irt0),5,-2,2),
irt(irt0) {}
319 for (
int i=0; i<4; i++)
327 for (
int i=0; i<4; i++)
341 :
Test(
"Count::Var::Var::Shared::B::"+
str(irt0),5,-2,2),
irt(irt0) {}
345 for (
int i=0; i<4; i++)
353 for (
int i=0; i<4; i++)
367 :
Test(
"Count::Var::Var::Shared::C::"+
str(irt0),4,-2,2),
irt(irt0) {}
371 for (
int i=0; i<4; i++)
388 (void)
new IntInt(irts.irt());
389 (void)
new SetInt(irts.irt());
391 (void)
new IntVar(irts.irt());
392 (void)
new SetVar(irts.irt());
Node * x
Pointer to corresponding Boolean expression node.
int size(void) const
Return size of array (number of elements)
Passing integer arguments.
Passing integer variables.
Base class for assignments
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test number of several equal integers equal to integer
IntArrayInt(Gecode::IntRelType irt0)
Create and register test.
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.
Test number of several equal integers equal to integer variable
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntArrayVar(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal integers equal to integer with duplicate variables
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
IntIntDup(Gecode::IntRelType irt0)
Create and register test.
Test number of equal integers equal to integer
IntInt(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
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 variable with sharing
Gecode::IntRelType irt
Integer relation type to propagate.
IntVarShared(Gecode::IntRelType irt0)
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
Test number of equal integers equal to integer variable
IntVar(Gecode::IntRelType irt0)
Create and register test.
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.
Test number of integers contained in an integer set equal to integer
virtual bool solution(const Assignment &x) const
Test whether x is solution
SetInt(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.
Test number of integers contained in an integer set equal to integer variable
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
SetVar(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of equal variables equal to integer
Gecode::IntRelType irt
Integer relation type to propagate.
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
VarInt(Gecode::IntRelType irt0, Gecode::IntPropLevel ipl)
Create and register test.
Test number of equal variables equal to integer variable with sharing
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
VarVarSharedA(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of equal variables equal to integer variable with sharing
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
VarVarSharedB(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of equal variables 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.
VarVarSharedC(Gecode::IntRelType irt0)
Create and register test.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal variables equal to integer variable
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
VarVar(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.
Iterator for integer relation types.
Gecode::IntPropLevel ipl
Propagation level.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
ConTestLevel contest
Whether to test for certain consistency.
IntRelType
Relation types for integers.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_BND
Bounds propagation.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Gecode::IntArgs ints({1, 0, 3, 2})
@ CTL_NONE
No consistency-test.