42 namespace Test {
namespace Int {
57 :
Test(
"Unshare::Int::"+
str(ipl),9,-1,1,false,ipl) {}
60 return ((x[0] == x[3]) &&
61 (x[1] == x[4]) && (x[1] == x[6]) &&
62 (x[2] == x[5]) && (x[2] == x[7]) && (x[2] == x[8]));
68 y[0]=x[0]; y[1]=y[3]=x[1]; y[2]=y[4]=y[5]=x[2];
70 for (
int i=0;
i<6;
i++)
80 :
Test(
"Unshare::Bool",9,0,1,false) {}
83 return ((x[0] == x[3]) &&
84 (x[1] == x[4]) && (x[1] == x[6]) &&
85 (x[2] == x[5]) && (x[2] == x[7]) && (x[2] == x[8]));
93 y[2]=y[4]=y[5]=
channel(home,x[2]);
95 for (
int i=0;
i<6;
i++)
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 .
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Test for unsharing Boolean variables
Int i_bnd(Gecode::IPL_BND)
Bool(void)
Create and register test.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::IntPropLevel ipl
Propagation level.
Passing integer variables.
Passing Boolean variables.
IntPropLevel
Propagation levels for integer propagators.
Post propagator for SetVar SetOpType SetVar y
Int i_dom(Gecode::IPL_DOM)
Node * x
Pointer to corresponding Boolean expression node.
Base class for assignments
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Domain propagation Preferences: prefer speed or memory.
Gecode toplevel namespace
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.
void unshare(Home home, BoolVarArgs &x, IntPropLevel)
Replace multiple variable occurences in x by fresh variables.