38 namespace Test {
namespace Set {
41 namespace RelOpConst {
63 template<
class I,
class J>
65 sol(I&
i, J& j)
const {
89 int intSet,
bool inverse0)
90 :
SetTest(
"RelOp::ConstSIS::"+str(sot0)+
"::"+str(srt0)+
"::"+
91 str(intSet)+(inverse0 ?
"i" :
""),2,ds_22,false)
92 , is(iss[intSet]), sot(sot0), srt(srt0), inverse(inverse0) {}
158 template<
class I,
class J>
160 sol(I&
i, J& j)
const {
185 :
SetTest(
"RelOp::ConstSSI::"+str(sot0)+
"::"+str(srt0)+
"::"+
186 str(intSet),2,ds_22,false)
187 , is(iss[intSet]), sot(sot0), srt(srt0) {}
245 template<
class I,
class J>
247 sol(I&
i, J& j)
const {
271 int intSet0,
int intSet1,
bool inverse0)
272 :
SetTest(
"RelOp::ConstISI::"+str(sot0)+
"::"+str(srt0)+
"::"+
273 str(intSet0)+
"::"+str(intSet1)+
274 (inverse0 ?
"i" :
""),1,ds_33,false)
275 , is0(iss[intSet0]), is1(iss[intSet1]), sot(sot0), srt(srt0)
276 , inverse(inverse0) {}
342 for (
int i=0;
i<=2;
i++) {
343 (void)
new RelSIS(sots.sot(),srts.srt(),
i,
false);
344 (void)
new RelSIS(sots.sot(),srts.srt(),
i,
true);
345 (void)
new RelSSI(sots.sot(),srts.srt(),
i);
346 (void)
new RelISI(sots.sot(),srts.srt(),
i,0,
false);
347 (void)
new RelISI(sots.sot(),srts.srt(),
i,1,
false);
348 (void)
new RelISI(sots.sot(),srts.srt(),
i,2,
false);
349 (void)
new RelISI(sots.sot(),srts.srt(),
i,0,
true);
350 (void)
new RelISI(sots.sot(),srts.srt(),
i,1,
true);
351 (void)
new RelISI(sots.sot(),srts.srt(),
i,2,
true);
Iterator for Boolean operation types.
SetRelType
Common relation types for sets.
Iterator for set relation types.
Range iterator for integer sets.
bool solution(const SetAssignment &x) const
Test whether x is solution
Test for set relation constraint with constants
bool solution(const SetAssignment &x) const
Test whether x is solution
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
SetOpType
Common operations for sets.
RelISI(Gecode::SetOpType sot0, Gecode::SetRelType srt0, int intSet0, int intSet1, bool inverse0)
Create and register test.
void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Range iterator for computing intersection (binary)
RelSSI(Gecode::SetOpType sot0, Gecode::SetRelType srt0, int intSet)
Create and register test.
A complement iterator spezialized for the BndSet limits.
Gecode::IntSet lub
The common superset for all domains.
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
Help class to create and register tests.
bool solution(const SetAssignment &x) const
Test whether x is solution
Range iterator for computing union (binary)
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
Create(void)
Perform creation and registration.
Base class for tests with set constraints
Generate all set assignments.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Range iterator producing subsets of an IntSet.
Post propagator for SetVar x
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
RelSIS(Gecode::SetOpType sot0, Gecode::SetRelType srt0, int intSet, bool inverse0)
Create and register test.
Gecode toplevel namespace
Range iterator for computing set difference.
#define GECODE_NEVER
Assert that this command is never executed.
Test for set relation constraint with constants
Test for set relation constraint with constants