68 :
Test(
"MiniModel::"+
expand(irt0)+
"::Int::Int",4,-2,2),
irt(irt0) {}
72 for (
int i=x.size(); i--; )
99 :
Test(
"MiniModel::"+
expand(irt0)+
"::Int::Var",5,-2,2),
irt(irt0) {}
103 for (
int i=0; i<4; i++)
111 for (
int i=0; i<4; i++)
133 :
Test(
"MiniModel::"+
expand(irt0)+
"::Var::Var",5,-2,2),
irt(irt0) {}
137 for (
int i=0; i<3; i++)
145 for (
int i=0; i<3; i++)
167 :
Test(
"MiniModel::"+
expand(irt0)+
"::Var::Int",4,-2,2),
irt(irt0) {}
171 for (
int i=0; i<3; i++)
179 for (
int i=0; i<3; i++)
203 :
Test(
"MiniModel::"+
expand(irt0)+
"::IntArray::Int",5,-2,2),
208 for (
int i=0; i<4; i++)
216 for (
int i=0; i<4; i++)
238 :
Test(
"MiniModel::"+
expand(irt0)+
"::IntArray::Var",5,-2,2),
243 for (
int i=0; i<4; i++)
251 for (
int i=0; i<4; i++)
274 (void)
new IntInt(irts.irt());
275 (void)
new IntVar(irts.irt());
276 (void)
new VarVar(irts.irt());
277 (void)
new VarInt(irts.irt());
Passing integer arguments.
Passing integer variables.
Base class for assignments
Iterator for integer relation types.
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test number of several equal integers equal to integer
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.
IntArrayInt(Gecode::IntRelType irt0)
Create and register test.
Test number of several equal integers equal to integer variable
Gecode::IntRelType irt
Integer relation type to propagate.
virtual bool solution(const Assignment &x) const
Test whether x is solution
IntArrayVar(Gecode::IntRelType irt0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of equal integers equal to integer
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
IntInt(Gecode::IntRelType irt0)
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 equal integers equal to integer variable
Gecode::IntRelType irt
Integer relation type to propagate.
IntVar(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 variables equal to integer
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
VarInt(Gecode::IntRelType irt0)
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 equal variables equal to integer variable
VarVar(Gecode::IntRelType irt0)
Create and register test.
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.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
IntRelType
Relation types for integers.
@ IRT_GQ
Greater or equal ( )
@ IRT_LQ
Less or equal ( )
void atmost(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
void atleast(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
void exactly(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
Tests for minimal modelling constraints (counting)
std::string expand(Gecode::IntRelType irt)
Expand relation to abbreviation.
Gecode::IntArgs ints({1, 0, 3, 2})
Testing finite domain integers.
#define GECODE_NEVER
Assert that this command is never executed.