38 namespace Test {
namespace Int {
70 :
Test(
"Bool::Bin::XYZ::"+
str(op0),3,0,1), op(op0) {}
73 return check(x[0],op,x[1]) == x[2];
92 :
Test(
"Bool::Bin::XXY::"+
str(op0),2,0,1), op(op0) {}
95 return check(x[0],op,x[0]) == x[1];
113 :
Test(
"Bool::Bin::XYX::"+
str(op0),2,0,1), op(op0) {}
116 return check(x[0],op,x[1]) == x[0];
134 :
Test(
"Bool::Bin::XYY::"+
str(op0),2,0,1), op(op0) {}
137 return check(x[0],op,x[1]) == x[1];
155 :
Test(
"Bool::Bin::XXX::"+
str(op0),1,0,1), op(op0) {}
158 return check(x[0],op,x[0]) == x[0];
164 rel(home, b, op, b, b);
178 :
Test(
"Bool::Bin::XY::"+
str(op0)+
"::"+
str(c0),2,0,1),
182 return check(x[0],op,x[1]) ==
c;
201 :
Test(
"Bool::Bin::XX::"+
str(op0)+
"::"+
str(c0),1,0,1),
205 return check(x[0],op,x[0]) ==
c;
211 rel(home, b, op, b, c);
223 :
Test(
"Bool::Nary::"+
str(op0)+
"::"+
str(n),n+1,0,1), op(op0) {}
227 int b =
check(x[n-2],op,x[n-1]);
228 for (
int i=0;
i<n-2;
i++)
236 for (
int i=x.
size()-1;
i--; )
250 :
Test(
"Bool::Nary::Shared::"+
str(op0)+
"::"+
str(n),n,0,1),
258 int b =
check(x[n-2],op,x[n-1]);
259 for (
int i=0;
i<n-2;
i++)
267 for (
int i=x.
size();
i--; )
283 :
Test(
"Bool::Nary::"+
str(op0)+
"::"+
str(n)+
"::"+
str(c0),n,0,1),
288 int b =
check(x[n-2],op,x[n-1]);
289 for (
int i=0;
i<n-2;
i++)
297 for (
int i=x.
size();
i--; )
312 :
Test(
"Bool::Clause::XYZ::"+
str(op0)+
"::"+
str(n),n+1,0,1), op(op0) {}
315 int n = (x.
size()-1) / 2;
318 b =
check(x[0],op,!x[1]);
320 b =
check(x[0],op,!x[n]);
321 for (
int i=1;
i<
n;
i++)
324 return b == x[x.
size()-1];
329 int n = (x.
size()-1) / 2;
331 for (
int i=n;
i--; ) {
347 :
Test(
"Bool::Clause::XXYYX::"+
str(op0)+
"::"+
str(n),n,0,1),
351 int n = x.
size() / 2;
354 b =
check(x[0],op,!x[1]);
356 b =
check(x[0],op,!x[n]);
357 for (
int i=1;
i<
n;
i++)
365 int n = x.
size() / 2;
367 for (
int i=n;
i--; ) {
383 :
Test(
"Bool::Clause::XXY::"+
str(op0)+
"::"+
str(n),n,0,1),
392 int n = x.
size() / 2;
394 for (
int i=n;
i--; ) {
412 :
Test(
"Bool::Clause::"+
str(op0)+
"::"+
str(n)+
"::"+
str(c0),n,0,1),
416 int n = x.
size() / 2;
419 b =
check(x[0],op,!x[1]);
421 b =
check(x[0],op,!x[n]);
422 for (
int i=1;
i<
n;
i++)
430 int n = x.
size() / 2;
432 for (
int i=n;
i--; ) {
445 :
Test(
"ITE::Int::"+
str(ipl),4,-4,4,false,ipl) {}
448 if ((x[0] < 0) || (x[0] > 1))
470 :
Test(
"ITE::Bool",4,0,1,false) {}
493 (void)
new BinXYZ(bots.bot());
494 (void)
new BinXXY(bots.bot());
495 (void)
new BinXYX(bots.bot());
496 (void)
new BinXYY(bots.bot());
497 (void)
new BinXXX(bots.bot());
502 (void)
new Nary(bots.bot(),2);
503 (void)
new Nary(bots.bot(),6);
504 (void)
new Nary(bots.bot(),10);
BinConstXY(Gecode::BoolOpType op0, int c0)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for Clause Boolean operation
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
int check(int x0, Gecode::BoolOpType op, int x1)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Post propagator for SetVar SetOpType op
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
Gecode::BoolOpType op
Boolean operation type for test.
ITEInt itebnd(Gecode::IPL_BND)
void ite(Home home, BoolVar b, SetVar x, SetVar y, SetVar z)
Post propagator for if-then-else constraint.
BinConstXX(Gecode::BoolOpType op0, int c0)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check 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)
int size(void) const
Return number of variables.
Test for binary Boolean operation with shared variables
Test for binary Boolean operation with shared variables
static Gecode::Support::RandomGenerator rand
Random number generator.
Test for Nary Boolean operation with constant
virtual bool solution(const Assignment &x) const
Check whether x is solution.
BoolOpType
Operation types for Booleans.
Nary(Gecode::BoolOpType op0, int n)
Construct and register test.
BinXYX(Gecode::BoolOpType op0)
Construct and register test.
void rel(Home home, BoolOpType o, const BoolVarArgs &x, int n, IntPropLevel)
Post domain consistent propagator for Boolean operation on x.
Test for Clause Boolean operation
Test for binary Boolean operation with constant
Test for Nary Boolean operation
Create(void)
Perform creation and registration.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Gecode::BoolOpType op
Boolean operation type for test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
NaryShared(Gecode::BoolOpType op0, int n)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
NaryConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ClauseConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
Test for binary Boolean operation with shared variables
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Gecode::BoolOpType op
Boolean operation type for test.
BinXYZ(Gecode::BoolOpType op0)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ITEInt(Gecode::IntPropLevel ipl)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
ITEInt itedom(Gecode::IPL_DOM)
BinXYY(Gecode::BoolOpType op0)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for Nary Boolean operation
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Gecode::IntPropLevel ipl
Propagation level.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Passing Boolean variables.
Test for if-then-else-constraint
Gecode::BoolOpType op
Boolean operation type for test.
Gecode::BoolOpType op
Boolean operation type for test.
Boolean integer variables.
bool testfix
Whether to perform fixpoint test.
IntPropLevel
Propagation levels for integer propagators.
Gecode::BoolOpType op
Boolean operation type for test.
BinXXY(Gecode::BoolOpType op0)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for Clause Boolean operation
Node * x
Pointer to corresponding Boolean expression node.
Test for binary Boolean operation
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ClauseXYZ(Gecode::BoolOpType op0, int n)
Construct and register test.
Base class for assignments
ITEBool(void)
Construct and register test.
Domain propagation Options: basic versus advanced propagation.
Test for Clause Boolean operation with constant
Help class to create and register tests.
Test for binary Boolean operation with shared variables
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
BinXXX(Gecode::BoolOpType op0)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Test for binary Boolean operation with shared variables and constant
Iterator for Boolean operation types.
Gecode toplevel namespace
ClauseXXY(Gecode::BoolOpType op0, int n)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ClauseXXYYX(Gecode::BoolOpType op0, int n)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
Gecode::BoolOpType op
Boolean operation type for test.
Test for if-then-else-constraint
Gecode::BoolOpType op
Boolean operation type for test.
#define GECODE_NEVER
Assert that this command is never executed.
Gecode::BoolOpType op
Boolean operation type for test.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, BoolVar z, IntPropLevel)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...