42 namespace Test {
namespace Int {
57 :
Test(
"Unshare::Int::"+
str(icl),9,-1,1,false,icl) {}
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++)
Int(Gecode::IntConLevel icl)
Create and register test.
IntConLevel
Consistency levels for integer propagators.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
void unshare(Home home, BoolVarArgs &x, IntConLevel)
Replace multiple variable occurences in x by fresh variables.
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
virtual bool solution(const Assignment &x) const
Test whether x is solution
Bool(void)
Create and register test.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
virtual bool solution(const Assignment &x) const
Test whether x is solution
Gecode::IntArgs i(4, 1, 2, 3, 4)
Gecode::IntConLevel icl
Consistency level.
Int i_dom(Gecode::ICL_DOM)
Int i_bnd(Gecode::ICL_BND)
Passing integer variables.
Passing Boolean variables.
Node * x
Pointer to corresponding Boolean expression node.
Base class for assignments
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Bounds propagation or consistency.
Gecode toplevel namespace
Test for unsharing integer variables
Domain propagation or consistency.