38namespace 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]));
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++)
67 rel(home, y[i], IRT_EQ, x[3+i], IPL_DOM);
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]));
87 y[0]=channel(home,x[0]);
88 y[1]=y[3]=channel(home,x[1]);
89 y[2]=y[4]=y[5]=channel(home,x[2]);
91 for (
int i=0; i<6; i++)
92 rel(home, y[i], IRT_EQ, channel(home,x[3+i]));
101 :
Test(
"Unshare::Failed",1,-1,1) {}
112 y[0]=x[0]; y[1]=x[0];
115 extensional(home, y,
r);
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 fail(void)
Fail space.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
@ IPL_BND
Bounds propagation.
Gecode toplevel namespace
Int i_bnd(Gecode::IPL_BND)
Int i_dom(Gecode::IPL_DOM)