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++)
261 :
Test(
"Count::Var::Var::"+
str(irt0),5,-2,2),
irt(irt0) {}
265 for (
int i=0;
i<3;
i++)
273 for (
int i=0;
i<3;
i++)
287 :
Test(
"Count::Var::Int::"+
str(irt0),4,-2,2),
irt(irt0) {}
291 for (
int i=0;
i<3;
i++)
299 for (
int i=0;
i<3;
i++)
313 :
Test(
"Count::Var::Var::Shared::A::"+
str(irt0),5,-2,2),
irt(irt0) {}
317 for (
int i=0;
i<4;
i++)
325 for (
int i=0;
i<4;
i++)
339 :
Test(
"Count::Var::Var::Shared::B::"+
str(irt0),5,-2,2),
irt(irt0) {}
343 for (
int i=0;
i<4;
i++)
351 for (
int i=0;
i<4;
i++)
365 :
Test(
"Count::Var::Var::Shared::C::"+
str(irt0),4,-2,2),
irt(irt0) {}
369 for (
int i=0;
i<4;
i++)
386 (void)
new IntInt(irts.irt());
387 (void)
new SetInt(irts.irt());
389 (void)
new IntVar(irts.irt());
390 (void)
new SetVar(irts.irt());
394 (void)
new VarVar(irts.irt());
395 (void)
new VarInt(irts.irt());
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of equal variables equal to integer variable with sharing
IntArrayVar(Gecode::IntRelType irt0)
Create and register test.
VarVarSharedA(Gecode::IntRelType irt0)
Create and register test.
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.
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
Gecode::IntRelType irt
Integer relation type to propagate.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of several equal integers equal to integer
Gecode::IntRelType irt
Integer relation type to propagate.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
VarInt(Gecode::IntRelType irt0)
Create and register test.
Test number of integers contained in an integer set equal to integer
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal integers equal to integer
Test number of equal variables equal to integer variable with sharing
VarVarSharedC(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of several equal integers equal to integer variable
virtual bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal variables equal to integer
Gecode::IntArgs ints(4, 1, 0, 3, 2)
Gecode::IntRelType irt
Integer relation type to propagate.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
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
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
Help class to create and register tests.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Create(void)
Perform creation and registration.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntRelType
Relation types for integers.
IntVarShared(Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
IntIntDup(Gecode::IntRelType irt0)
Create and register test.
Iterator for integer relation types.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test number of equal integers equal to integer variable
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
IntArrayInt(Gecode::IntRelType irt0)
Create and register test.
Passing integer variables.
Test number of integers contained in an integer set equal to integer variable
Passing integer arguments.
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 bool solution(const Assignment &x) const
Test whether x is solution
virtual bool solution(const Assignment &x) const
Test whether x is solution
Node * x
Pointer to corresponding Boolean expression node.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntConLevel)
Post propagator for .
VarVar(Gecode::IntRelType irt0)
Create and register test.
Test number of equal variables equal to integer variable
Base class for assignments
Gecode::IntRelType irt
Integer relation type to propagate.
Gecode::IntRelType irt
Integer relation type to propagate.
Test number of equal integers equal to integer variable with sharing
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.
Gecode::IntRelType irt
Integer relation type to propagate.
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.
Gecode::IntRelType irt
Integer relation type to propagate.
SetInt(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntVar(Gecode::IntRelType irt0)
Create and register test.
Test number of equal integers equal to integer with duplicate variables
IntInt(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