38 namespace Test {
namespace Int {
70 :
Test(
"Bool::Bin::XYZ::"+
str(op0),3,0,1),
op(op0) {}
77 using namespace Gecode;
92 :
Test(
"Bool::Bin::XXY::"+
str(op0),2,0,1),
op(op0) {}
99 using namespace Gecode;
113 :
Test(
"Bool::Bin::XYX::"+
str(op0),2,0,1),
op(op0) {}
120 using namespace Gecode;
134 :
Test(
"Bool::Bin::XYY::"+
str(op0),2,0,1),
op(op0) {}
141 using namespace Gecode;
155 :
Test(
"Bool::Bin::XXX::"+
str(op0),1,0,1),
op(op0) {}
162 using namespace Gecode;
178 :
Test(
"Bool::Bin::XY::"+
str(op0)+
"::"+
str(c0),2,0,1),
186 using namespace Gecode;
201 :
Test(
"Bool::Bin::XX::"+
str(op0)+
"::"+
str(c0),1,0,1),
209 using namespace Gecode;
228 for (
int i=0;
i<
n-2;
i++)
234 using namespace Gecode;
236 for (
int i=
x.size()-1;
i--; )
250 :
Test(
"Bool::Nary::Shared::"+
str(op0)+
"::"+
str(
n),
n,0,1),
259 for (
int i=0;
i<
n-2;
i++)
265 using namespace Gecode;
267 for (
int i=
x.size();
i--; )
289 for (
int i=0;
i<
n-2;
i++)
295 using namespace Gecode;
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;
321 for (
int i=1;
i<
n;
i++)
324 return b ==
x[
x.size()-1];
328 using namespace Gecode;
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;
357 for (
int i=1;
i<
n;
i++)
364 using namespace Gecode;
365 int n =
x.size() / 2;
367 for (
int i=
n;
i--; ) {
383 :
Test(
"Bool::Clause::XXY::"+
str(op0)+
"::"+
str(
n),
n,0,1),
391 using namespace Gecode;
392 int n =
x.size() / 2;
394 for (
int i=
n;
i--; ) {
416 int n =
x.size() / 2;
422 for (
int i=1;
i<
n;
i++)
429 using namespace Gecode;
430 int n =
x.size() / 2;
432 for (
int i=
n;
i--; ) {
448 if ((
x[0] < 0) || (
x[0] > 1))
457 using namespace Gecode;
470 :
Test(
"ITE::Bool",4,0,1,false) {}
480 using namespace Gecode;
491 using namespace Gecode;
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);
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
Passing Boolean variables.
Boolean integer variables.
static Gecode::Support::RandomGenerator rand
Random number generator.
Base class for assignments
Iterator for Boolean operation types.
Test for binary Boolean operation with shared variables and constant
virtual bool solution(const Assignment &x) const
Check whether x is solution.
BinConstXX(Gecode::BoolOpType op0, int c0)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for binary Boolean operation with constant
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
BinConstXY(Gecode::BoolOpType op0, int c0)
Construct and register test.
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 void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
BinXXX(Gecode::BoolOpType op0)
Construct and register test.
Test for binary Boolean operation with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
BinXXY(Gecode::BoolOpType op0)
Construct and register test.
Test for binary Boolean operation with shared variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Gecode::BoolOpType op
Boolean operation type for test.
BinXYX(Gecode::BoolOpType op0)
Construct and register test.
Test for binary Boolean operation with shared variables
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.
BinXYY(Gecode::BoolOpType op0)
Construct and register test.
Test for binary Boolean operation
BinXYZ(Gecode::BoolOpType op0)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for Clause Boolean operation with constant
ClauseConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Test for Clause Boolean operation
ClauseXXYYX(Gecode::BoolOpType op0, int n)
Construct and register test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
Test for Clause Boolean operation
ClauseXXY(Gecode::BoolOpType op0, int n)
Construct and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Test for Clause Boolean operation
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
ClauseXYZ(Gecode::BoolOpType op0, int n)
Construct and register test.
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test for if-then-else-constraint
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
ITEBool(void)
Construct and register test.
Test for if-then-else-constraint
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ITEInt(Gecode::IntPropLevel ipl)
Construct and register test.
Test for Nary Boolean operation with constant
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
NaryConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
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.
NaryShared(Gecode::BoolOpType op0, int n)
Construct and register test.
Gecode::BoolOpType op
Boolean operation type for test.
Test for Nary Boolean operation
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Gecode::BoolOpType op
Boolean operation type for test.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Nary(Gecode::BoolOpType op0, int n)
Construct and register test.
bool testfix
Whether to perform fixpoint test.
Gecode::IntPropLevel ipl
Propagation level.
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 .
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
void rel(Home home, BoolOpType o, const BoolVarArgs &x, int n, IntPropLevel)
Post domain consistent propagator for Boolean operation on x.
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...
BoolOpType
Operation types for Booleans.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_BND
Bounds propagation.
Gecode::IntArgs i({1, 2, 3, 4})
int check(int x0, Gecode::BoolOpType op, int x1)
ITEInt itebnd(Gecode::IPL_BND)
ITEInt itedom(Gecode::IPL_DOM)
#define GECODE_NEVER
Assert that this command is never executed.