37 namespace Test {
namespace Int {
57 :
Test(
"NValues::Int::Int::"+
str(irt0)+
"::"+
str(n)+
"::"+
str(m0),
74 bool*
v =
new bool[n+1];
75 for (
int i=n+1;
i--; )
100 :
Test(
"NValues::Int::Var::"+
str(irt0)+
"::"+
str(n),n+1,0,n),
106 int n = x.
size() - 1;
107 bool*
v =
new bool[n+1];
108 for (
int i=n+1;
i--; )
117 return cmp(k,irt,x[n]);
121 int n = xy.
size() - 1;
139 :
Test(
"NValues::Bool::Int::"+
str(irt0)+
"::"+
str(n)+
"::"+
str(m0),
148 bool*
v =
new bool[n+1];
149 for (
int i=n+1;
i--; )
164 for (
int i=x.
size();
i--; )
178 :
Test(
"NValues::Bool::Var::"+
str(irt0)+
"::"+
str(n),n+1,0,2),
182 int n = x.
size() - 1;
186 bool*
v =
new bool[n+1];
187 for (
int i=n+1;
i--; )
196 return cmp(k,irt,x[n]);
201 int n = xy.
size() - 1;
215 for (
int i=1;
i<=7;
i += 3) {
216 for (
int m=0;
m<=3;
m++)
220 for (
int i=1;
i<=7;
i += 2) {
221 for (
int m=0;
m<=
i+1;
m++)
222 (
void)
new IntInt(
i,
m, irts.irt());
224 (void)
new IntVar(
i, irts.irt());
virtual bool solution(const Assignment &x) const
Test whether x is solution
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
int size(void) const
Return size of array (number of elements)
int size(void) const
Return number of variables.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
BoolVar(int n, Gecode::IntRelType irt0)
Create and register test.
IntVar(int n, Gecode::IntRelType irt0)
Create and register test.
Gecode::IntSet dom
Domain of variables.
Generate random selection of assignments.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &xy)
Post constraint on xy.
virtual Assignment * assignment(void) const
Create and register initial assignment.
Test number of values of integer variables equal to integer variable
Gecode::IntArgs i(4, 1, 2, 3, 4)
Help class to create and register tests.
int n
Number of negative literals for node type.
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel)
Post propagator for .
IntRelType
Relation types for integers.
Iterator for integer relation types.
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)
Post constraint on x.
Passing integer variables.
Passing Boolean variables.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &xy)
Post constraint on xy.
Test number of values of Boolean variables equal to integer
bool testfix
Whether to perform fixpoint test.
Post propagator for SetVar SetOpType SetVar y
virtual bool solution(const Assignment &x) const
Test whether x is solution
Node * x
Pointer to corresponding Boolean expression node.
bool testsearch
Whether to perform search test.
BoolInt(int n, int m0, Gecode::IntRelType irt0)
Create and register test.
Gecode::IntRelType irt
Integer relation type to propagate.
Base class for assignments
IntInt(int n, int m0, Gecode::IntRelType irt0)
Create and register test.
void nvalues(Home home, const BoolVarArgs &x, IntRelType irt, IntVar y, IntPropLevel)
Post propagator for .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test number of values of Boolean variables equal to integer variable
Gecode toplevel namespace
int arity
Number of variables.
Gecode::IntRelType irt
Integer relation type to propagate.
Test number of values of integer variables equal to integer
Create(void)
Perform creation and registration.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Generate all assignments.