44 namespace Test {
namespace Set {
68 ++sel2, selected++) {}
74 for (
int i=selected;
i--;++selector) {
75 if (selector.
val()>=3 || selector.
val()<0) {
96 for (
int i=x.
size()-2;
i--;)
112 :
SetTest(t,2,ds_13,false), i0(-3,-3), i1(-1,1), i2(0,2) {}
117 ++sel2, selected++) {}
121 IntSet iss[] = {i0, i1, i2};
124 for (
int i=selected;
i--;++selector) {
125 if (selector.
val()>=3 || selector.
val()<0) {
146 xs[0] = i0; xs[1] = i1; xs[2] = i2;
162 ++sel2, selected++) {}
168 for (
int i=selected;
i--;++selector) {
169 if (selector.
val()>=3 || selector.
val()<0) {
189 for (
int i=x.
size()-2;
i--;)
206 ++sel2, selected++) {}
212 for (
int i=selected;
i--;++selector) {
213 if (selector.
val()>=3 || selector.
val()<0) {
233 for (
int i=x.
size()-2;
i--;)
251 ++sel2, selected++) {
260 unsigned int cardsum = 0;
261 for (
int i=selected;
i--;++selector) {
262 if (selector.
val()>=3 || selector.
val()<0) {
286 for (
int i=x.
size()-2;
i--;)
298 :
SetTest(t,4,ds_12,false,true) {}
310 for (
int i=x.
size()-1;
i--;)
326 :
SetTest(t,1,ds_13,false,true), i0(-3,-3), i1(-1,1), i2(0,2) {}
332 IntSet iss[] = {i0, i1, i2};
339 xs[0] = i0; xs[1] = i1; xs[2] = i2;
364 if ((y[0] > 1) || (y[1] > 1))
377 element(home, m, y[0], y[1], x[0]);
Gecode::IntSetArgs tm
Array for test matrix.
Test for matrix element with integer set array and set variable
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementUnion(const char *t)
Create and register test.
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
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.
Range iterator for integer sets.
int size(void) const
Return size of array (number of elements)
ElementInter(const char *t)
Create and register test.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
Test for ElementSet constraint
virtual void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x.
MatrixIntSet(void)
Create and register test.
const unsigned int card
Maximum cardinality of an integer set.
ElementInterIn _elementinterin("Element::InterIn")
ElementUnionConst _elementunionconst("Element::UnionConst")
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
void init(const IntSet &s)
Initialize with ranges for set s.
void init(const Gecode::IntSet &d, int cur)
Initialize with set d0 and bit-pattern cur0.
Test for Region memory area
Gecode::IntArgs i(4, 1, 2, 3, 4)
void reset(void)
Reset iterator to start.
Test for ElementUnion constraint
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementSet _elementset("Element::Set")
Range iterator for union of iterators.
ElementInterIn(const char *t)
Create and register test.
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x.
Gecode::IntSet lub
The common superset for all domains.
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
const Test::Int::Assignment & ints(void) const
Return assignment for integer variables.
Test for ElementDisjoint constraint
ElementUnion _elementunion("Element::Union")
Value iterator producing subsets of an IntSet.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementDisjoint(const char *t)
Create and register test.
ElementSetConst _elementsetconst("Element::SetConst")
Post propagator for SetVar SetOpType SetVar SetRelType r
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
int val(void) const
Return current value.
Post propagator for SetVar SetOpType SetVar y
ElementDisjoint _elementdisjoint("Element::Disjoint")
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
Range iterator for intersection of iterators.
Base class for tests with set constraints
Generate all set assignments.
ElementSet(const char *t)
Create and register test.
Base class for assignments
Range iterator producing subsets of an IntSet.
Test for ElementInter constraint
Post propagator for SetVar x
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Matrix-interface for arrays.
Test for ElementUnionConst constraint
Gecode toplevel namespace
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementUnionConst(const char *t)
Create and register test.
ElementSetConst(const char *t)
Create and register test.
Test for ElementInter constraint
virtual void post(Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &y)
Post constraint on x and y.
int intval(void) const
Return value for first integer variable.
ElementInter _elementinter("Element::Inter")
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Test for ElementSetConst constraint