Go to the documentation of this file.
44 namespace Test {
namespace Set {
68 ++sel2, selected++) {}
74 for (
int i=selected;
i--;++selector) {
75 if (selector.
val()>=3 || selector.
val()<0) {
98 for (
int i=
x.size()-2;
i--;)
114 :
SetTest(
t,2,ds_13,false), i0(-3,-3), i1(-1,1), i2(0,2) {}
119 ++sel2, selected++) {}
123 IntSet iss[] = {i0, i1, i2};
126 for (
int i=selected;
i--;++selector) {
127 if (selector.
val()>=3 || selector.
val()<0) {
150 xs[0] = i0; xs[1] = i1; xs[2] = i2;
166 ++sel2, selected++) {}
172 for (
int i=selected;
i--;++selector) {
173 if (selector.
val()>=3 || selector.
val()<0) {
195 for (
int i=
x.size()-2;
i--;)
212 ++sel2, selected++) {}
218 for (
int i=selected;
i--;++selector) {
219 if (selector.
val()>=3 || selector.
val()<0) {
241 for (
int i=
x.size()-2;
i--;)
259 ++sel2, selected++) {
268 unsigned int cardsum = 0;
269 for (
int i=selected;
i--;++selector) {
270 if (selector.
val()>=3 || selector.
val()<0) {
296 for (
int i=
x.size()-2;
i--;)
311 if (
x.intval() < 0 ||
x.intval() > 2)
320 for (
int i=
x.size()-1;
i--;)
336 :
SetTest(
t,1,ds_13,false,true), i0(-3,-3), i1(-1,1), i2(0,2) {}
339 if (
x.intval() < 0 ||
x.intval() > 2)
342 IntSet iss[] = {i0, i1, i2};
349 xs[0] = i0; xs[1] = i1; xs[2] = i2;
374 if ((
y[0] > 1) || (
y[1] > 1))
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
Test for ElementUnion constraint
Test for ElementUnionConst constraint
Test for ElementInter constraint
ElementInter(const char *t)
Create and register test.
ElementDisjoint _elementdisjoint("Element::Disjoint")
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
unsigned int size(I &i)
Size of all ranges of range iterator i.
Test for ElementSet constraint
int val(void) const
Return current value.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementUnion(const char *t)
Create and register test.
ElementUnionConst _elementunionconst("Element::UnionConst")
union Gecode::@579::NNF::@61 u
Union depending on nodetype t.
Range iterator for integer sets.
Test for matrix element with integer set array and set variable
Generate all set assignments.
ElementInter _elementinter("Element::Inter")
Gecode toplevel namespace
ElementUnion _elementunion("Element::Union")
const unsigned int card
Maximum cardinality of an integer set.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementInterIn(const char *t)
Create and register test.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
ElementDisjoint(const char *t)
Create and register test.
Test for ElementDisjoint constraint
Post propagator for SetVar SetOpType SetVar SetRelType r
Test for ElementInter constraint
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Value iterator producing subsets of an IntSet.
Base class for tests with set constraints
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
Range iterator for union of iterators.
MatrixIntSet(void)
Create and register test.
virtual void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x.
ElementSetConst(const char *t)
Create and register test.
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Matrix-interface for arrays.
virtual void post(Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &y)
Post constraint on x and y.
Base class for assignments
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
@ SOT_DUNION
Disjoint union.
virtual void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x.
ElementSetConst _elementsetconst("Element::SetConst")
ElementInterIn _elementinterin("Element::InterIn")
ElementSet(const char *t)
Create and register test.
Test for ElementSetConst constraint
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
void init(const IntSet &s)
Initialize with ranges for set s.
Gecode::IntSetArgs tm
Array for test matrix.
void init(const Gecode::IntSet &d, int cur)
Initialize with set d0 and bit-pattern cur0.
ElementUnionConst(const char *t)
Create and register test.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementSet _elementset("Element::Set")
Test for Region memory area
Range iterator producing subsets of an IntSet.
Range iterator for intersection of iterators.
Fake space for creation of regions.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.