42 namespace Test {
namespace Set {
45 namespace RelOpConst {
67 template<
class I,
class J>
69 sol(I&
i, J& j)
const {
93 int intSet,
bool inverse0)
94 :
SetTest(
"RelOp::ConstSIS::"+str(sot0)+
"::"+str(srt0)+
"::"+
95 str(intSet)+(inverse0 ?
"i" :
""),2,ds_22,false)
96 , is(iss[intSet]), sot(sot0), srt(srt0), inverse(inverse0) {}
162 template<
class I,
class J>
164 sol(I&
i, J& j)
const {
189 :
SetTest(
"RelOp::ConstSSI::"+str(sot0)+
"::"+str(srt0)+
"::"+
190 str(intSet),2,ds_22,false)
191 , is(iss[intSet]), sot(sot0), srt(srt0) {}
249 template<
class I,
class J>
251 sol(I&
i, J& j)
const {
275 int intSet0,
int intSet1,
bool inverse0)
276 :
SetTest(
"RelOp::ConstISI::"+str(sot0)+
"::"+str(srt0)+
"::"+
277 str(intSet0)+
"::"+str(intSet1)+
278 (inverse0 ?
"i" :
""),1,ds_33,false)
279 , is0(iss[intSet0]), is1(iss[intSet1]), sot(sot0), srt(srt0)
280 , inverse(inverse0) {}
346 for (
int i=0;
i<=2;
i++) {
347 (void)
new RelSIS(sots.sot(),srts.srt(),
i,
false);
348 (void)
new RelSIS(sots.sot(),srts.srt(),
i,
true);
349 (void)
new RelSSI(sots.sot(),srts.srt(),
i);
350 (void)
new RelISI(sots.sot(),srts.srt(),
i,0,
false);
351 (void)
new RelISI(sots.sot(),srts.srt(),
i,1,
false);
352 (void)
new RelISI(sots.sot(),srts.srt(),
i,2,
false);
353 (void)
new RelISI(sots.sot(),srts.srt(),
i,0,
true);
354 (void)
new RelISI(sots.sot(),srts.srt(),
i,1,
true);
355 (void)
new RelISI(sots.sot(),srts.srt(),
i,2,
true);
IntRelType inverse(const IntRelType irt)
Inverse the relation.
Iterator for Boolean operation types.
SetRelType
Common relation types for sets.
Iterator for set relation types.
Range iterator for integer sets.
Test for set relation constraint with constants
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.
Help class to create and register tests.
Range iterator for computing union (binary)
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
bool solution(const SetAssignment &x) const
Test whether x is solution
Node * x
Pointer to corresponding Boolean expression node.
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.
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
bool solution(const SetAssignment &x) const
Test whether x is solution
RelSIS(Gecode::SetOpType sot0, Gecode::SetRelType srt0, int intSet, bool inverse0)
Create and register test.
Gecode toplevel namespace
Range iterator for computing set difference.
bool solution(const SetAssignment &x) const
Test whether x is solution
#define GECODE_NEVER
Assert that this command is never executed.
Test for set relation constraint with constants
Test for set relation constraint with constants