41 namespace Test {
namespace Int {
78 bool*
v =
new bool[
n+1];
79 for (
int i=
n+1;
i--; )
110 int n =
x.size() - 1;
111 bool*
v =
new bool[
n+1];
112 for (
int i=
n+1;
i--; )
125 int n = xy.
size() - 1;
152 bool*
v =
new bool[
n+1];
153 for (
int i=
n+1;
i--; )
168 for (
int i=
x.size();
i--; )
182 :
Test(
"NValues::Bool::Var::"+
str(irt0)+
"::"+
str(
n),
n+1,0,2),
186 int n =
x.size() - 1;
190 bool*
v =
new bool[
n+1];
191 for (
int i=
n+1;
i--; )
205 int n = xy.
size() - 1;
219 for (
int i=1;
i<=7;
i += 3) {
220 for (
int m=0;
m<=3;
m++)
224 for (
int i=1;
i<=7;
i += 2) {
225 for (
int m=0;
m<=
i+1;
m++)
226 (
void)
new IntInt(
i,
m, irts.irt());
228 (void)
new IntVar(
i, irts.irt());
virtual bool solution(const Assignment &x) const
Test whether x is solution
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)
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.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
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.
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.
void nvalues(Home home, const BoolVarArgs &x, IntRelType irt, IntVar y, IntConLevel)
Post propagator for .
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.
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
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntConLevel)
Post propagator for .
Generate all assignments.