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