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--;)
308 :
SetTest(t,4,ds_12,false,true) {}
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) {}
342 IntSet iss[] = {i0, i1, i2};
349 xs[0] = i0; xs[1] = i1; xs[2] = i2;
374 if ((y[0] > 1) || (y[1] > 1))
387 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
ElementUnion(const char *t)
Create and register test.
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Range iterator for integer sets.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Fake space for creation of regions.
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.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void reset(void)
Reset iterator to start.
Test for ElementUnion constraint
const Test::Int::Assignment & ints(void) const
Return assignment for integer variables.
ElementSet _elementset("Element::Set")
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Range iterator for union of iterators.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
ElementInterIn(const char *t)
Create and register test.
unsigned int size(I &i)
Size of all ranges of range iterator i.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Gecode::IntSet lub
The common superset for all domains.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntConLevel)
Post domain consistent propagator for .
int val(void) const
Return current value.
Test for ElementDisjoint constraint
ElementUnion _elementunion("Element::Union")
Value iterator producing subsets of an IntSet.
ElementDisjoint(const char *t)
Create and register test.
ElementSetConst _elementsetconst("Element::SetConst")
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
int intval(void) const
Return value for first integer variable.
ElementDisjoint _elementdisjoint("Element::Disjoint")
Node * x
Pointer to corresponding Boolean expression node.
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
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Matrix-interface for arrays.
Test for ElementUnionConst constraint
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
ElementUnionConst(const char *t)
Create and register test.
ElementSetConst(const char *t)
Create and register test.
Test for ElementInter constraint
int size(void) const
Return size of array (number of elements)
virtual void post(Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &y)
Post constraint on x and y.
ElementInter _elementinter("Element::Inter")
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Test for ElementSetConst constraint