38 namespace Test {
namespace Int {
56 return ((
x[0] ==
x[3]) &&
57 (
x[1] ==
x[4]) && (
x[1] ==
x[6]) &&
58 (
x[2] ==
x[5]) && (
x[2] ==
x[7]) && (
x[2] ==
x[8]));
62 using namespace Gecode;
64 y[0]=
x[0];
y[1]=
y[3]=
x[1];
y[2]=
y[4]=
y[5]=
x[2];
65 unshare(home,
y,
ipl);
66 for (
int i=0;
i<6;
i++)
76 :
Test(
"Unshare::Bool",9,0,1,false) {}
79 return ((
x[0] ==
x[3]) &&
80 (
x[1] ==
x[4]) && (
x[1] ==
x[6]) &&
81 (
x[2] ==
x[5]) && (
x[2] ==
x[7]) && (
x[2] ==
x[8]));
85 using namespace Gecode;
91 for (
int i=0;
i<6;
i++)
101 :
Test(
"Unshare::Failed",1,-1,1) {}
109 using namespace Gecode;
112 y[0]=
x[0];
y[1]=
x[0];
Node * x
Pointer to corresponding Boolean expression node.
Passing Boolean variables.
Passing integer variables.
Regular expressions over integer values.
Base class for assignments
Gecode::IntPropLevel ipl
Propagation level.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
Test for unsharing Boolean variables
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Bool(void)
Create and register test.
Test for unsharing in failed spaces
Failed(void)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Test for unsharing integer variables
Int(Gecode::IntPropLevel ipl)
Create and register test.
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.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Post propagator for SetVar SetOpType SetVar y
void fail(void)
Fail space.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void extensional(Home home, const IntVarArgs &x, DFA dfa, IntPropLevel)
Post domain consistent propagator for extensional constraint described by a DFA.
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 i_bnd(Gecode::IPL_BND)
Int i_dom(Gecode::IPL_DOM)