42 namespace Test {
namespace Int {
60 :
Test(
"Channel::Full::"+
str(xoff0)+
"::"+
str(yoff0)+
"::"+
str(icl),
62 xoff(xoff0), yoff(yoff0) {
67 for (
int i=0;
i<4;
i++)
76 for (
int i=4;
i--; ) {
78 IntVar xo(home, xoff, 3+xoff);
85 IntVar yo(home, yoff, 3+yoff);
101 :
Test(
"Channel::Half::"+
str(icl),6,0,5,false,icl) {
106 for (
int i=0;
i<6;
i++)
107 for (
int j=
i+1; j<6; j++)
116 for (
int i=0;
i<6;
i++)
117 for (
int j=0; j<6; j++) {
131 :
Test(
"Channel::Shared::"+
str(icl),6,0,5,false,icl) {
136 for (
int i=0;
i<6;
i++)
153 :
Test(
"Channel::Bool::Single",2,-1,2) {
158 return ((x[0]==0) || (x[0]==1)) && (x[0]==x[1]);
176 :
Test(
"Channel::Bool::Multi::"+s,7,min,max), o(o0) {
182 if ((x[
i] != 0) && (x[
i] != 1))
187 for (
int i=0;
i<k;
i++)
190 for (
int i=k+1;
i<
n;
i++)
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Simple test for channel (testing single set of variables)
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ChannelFull cfd35(3, 5, Gecode::ICL_DOM)
IntConLevel
Consistency levels for integer propagators.
ChannelFull cfv(0, 0, Gecode::ICL_VAL)
const FloatNum max
Largest allowed float value.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Value propagation or consistency (naive)
Test channel between integer variable and array of Boolean variables
ChannelShared(Gecode::IntConLevel icl)
Construct and register test.
Gecode::IntSet dom
Domain of variables.
Simple test for channel (testing all variables)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
ConTestLevel contest
Whether to test for certain consistency.
ChannelShared csv(Gecode::ICL_VAL)
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Gecode::IntConLevel icl
Consistency level.
ChannelFull cfd11(1, 1, Gecode::ICL_DOM)
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ChannelFull cfv35(3, 5, Gecode::ICL_VAL)
ChannelFull cfv11(1, 1, Gecode::ICL_VAL)
ChannelLinkMulti clmb("B", 1, 6, 1)
Test channel with shared variables
ChannelLinkMulti clmc("C",-1, 4,-1)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Passing integer variables.
Passing Boolean variables.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Boolean integer variables.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Node * x
Pointer to corresponding Boolean expression node.
ChannelLinkMulti clma("A", 0, 5, 0)
Base class for assignments
ChannelHalf(Gecode::IntConLevel icl)
Construct and register test.
void channel(Home home, const SetVarArgs &x, const SetVarArgs &y)
Post propagator for .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
virtual bool solution(const Assignment &x) const
Check whether x is solution.
ChannelHalf chd(Gecode::ICL_DOM)
ChannelFull cfd(0, 0, Gecode::ICL_DOM)
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
ChannelShared csd(Gecode::ICL_DOM)
int size(void) const
Return size of array (number of elements)
ChannelLinkSingle(void)
Construct and register test.
ChannelFull(int xoff0, int yoff0, Gecode::IntConLevel icl)
Construct and register test.
int size(void) const
Return number of variables.
Test channel between integer and Boolean variable
Domain propagation or consistency.
ChannelLinkMulti(const std::string &s, int min, int max, int o0)
Construct and register test.
ChannelHalf chv(Gecode::ICL_VAL)