42 namespace Test {
namespace Int {
74 :
Test(
"Bool::Bin::XYZ::"+
str(op0),3,0,1), op(op0) {}
77 return check(x[0],op,x[1]) == x[2];
96 :
Test(
"Bool::Bin::XXY::"+
str(op0),2,0,1), op(op0) {}
99 return check(x[0],op,x[0]) == x[1];
117 :
Test(
"Bool::Bin::XYX::"+
str(op0),2,0,1), op(op0) {}
120 return check(x[0],op,x[1]) == x[0];
138 :
Test(
"Bool::Bin::XYY::"+
str(op0),2,0,1), op(op0) {}
141 return check(x[0],op,x[1]) == x[1];
159 :
Test(
"Bool::Bin::XXX::"+
str(op0),1,0,1), op(op0) {}
162 return check(x[0],op,x[0]) == x[0];
168 rel(home, b, op, b, b);
182 :
Test(
"Bool::Bin::XY::"+
str(op0)+
"::"+
str(c0),2,0,1),
186 return check(x[0],op,x[1]) ==
c;
205 :
Test(
"Bool::Bin::XX::"+
str(op0)+
"::"+
str(c0),1,0,1),
209 return check(x[0],op,x[0]) ==
c;
215 rel(home, b, op, b, c);
227 :
Test(
"Bool::Nary::"+
str(op0)+
"::"+
str(n),n+1,0,1), op(op0) {}
231 int b =
check(x[n-2],op,x[n-1]);
232 for (
int i=0;
i<n-2;
i++)
240 for (
int i=x.
size()-1;
i--; )
254 :
Test(
"Bool::Nary::Shared::"+
str(op0)+
"::"+
str(n),n,0,1),
262 int b =
check(x[n-2],op,x[n-1]);
263 for (
int i=0;
i<n-2;
i++)
271 for (
int i=x.
size();
i--; )
287 :
Test(
"Bool::Nary::"+
str(op0)+
"::"+
str(n)+
"::"+
str(c0),n,0,1),
292 int b =
check(x[n-2],op,x[n-1]);
293 for (
int i=0;
i<n-2;
i++)
301 for (
int i=x.
size();
i--; )
316 :
Test(
"Bool::Clause::XYZ::"+
str(op0)+
"::"+
str(n),n+1,0,1), op(op0) {}
319 int n = (x.
size()-1) / 2;
322 b =
check(x[0],op,!x[1]);
324 b =
check(x[0],op,!x[n]);
325 for (
int i=1;
i<
n;
i++)
328 return b == x[x.
size()-1];
333 int n = (x.
size()-1) / 2;
335 for (
int i=n;
i--; ) {
351 :
Test(
"Bool::Clause::XXYYX::"+
str(op0)+
"::"+
str(n),n,0,1),
355 int n = x.
size() / 2;
358 b =
check(x[0],op,!x[1]);
360 b =
check(x[0],op,!x[n]);
361 for (
int i=1;
i<
n;
i++)
369 int n = x.
size() / 2;
371 for (
int i=n;
i--; ) {
387 :
Test(
"Bool::Clause::XXY::"+
str(op0)+
"::"+
str(n),n,0,1),
396 int n = x.
size() / 2;
398 for (
int i=n;
i--; ) {
416 :
Test(
"Bool::Clause::"+
str(op0)+
"::"+
str(n)+
"::"+
str(c0),n,0,1),
420 int n = x.
size() / 2;
423 b =
check(x[0],op,!x[1]);
425 b =
check(x[0],op,!x[n]);
426 for (
int i=1;
i<
n;
i++)
434 int n = x.
size() / 2;
436 for (
int i=n;
i--; ) {
449 :
Test(
"ITE::Int::"+
str(ipl),4,-4,4,false,ipl) {}
452 if ((x[0] < 0) || (x[0] > 1))
474 :
Test(
"ITE::Bool",4,0,1,false) {}
497 (void)
new BinXYZ(bots.bot());
498 (void)
new BinXXY(bots.bot());
499 (void)
new BinXYX(bots.bot());
500 (void)
new BinXYY(bots.bot());
501 (void)
new BinXXX(bots.bot());
506 (void)
new Nary(bots.bot(),2);
507 (void)
new Nary(bots.bot(),6);
508 (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.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
ClauseConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Test for binary Boolean operation with shared variables
struct Gecode::@579::NNF::@61::@62 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 Preferences: prefer speed or memory.
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.
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...