40 namespace Gecode {
namespace Iter {
namespace Ranges {
47 template<
class I,
class J>
62 void init(I& i, J& j);
83 template<
class I,
class J>
97 template<
class I,
class J>
106 template<
class I,
class J>
126 template<
class I,
class J>
133 if (!
i() || (j() && (j.max()+1 <
i.min()))) {
134 mi = j.min(); ma = j.max(); ++j;
return;
136 if (!j() || (
i() && (
i.max()+1 < j.min()))) {
137 mi =
i.min(); ma =
i.max(); ++
i;
return;
146 if (
i() && (i.min() <= ma+1)) {
150 if (j() && (j.min() <= ma+1)) {
157 template<
class I,
class J>
161 template<
class I,
class J>
168 template<
class I,
class J>
182 template<
class I,
class J>
189 if (i.max()+1 < j.min()) {
191 *c =
t; c = &t->
next;
192 }
else if (j.max()+1 < i.min()) {
194 *c =
t; c = &t->
next;
201 if (
i() && (i.min() <= max+1)) {
205 if (j() && (j.min() <= max+1)) {
211 *c =
t; c = &t->
next;
215 *c =
t; c = &t->
next;
219 *c =
t; c = &t->
next;
231 while ((*c != NULL) &&
i())
232 if ((*c)->max+1 < i.min()) {
235 }
else if (i.max()+1 < (*c)->min) {
252 if ((s != NULL) && (s->min <= max+1)) {
260 if (
i() && (i.min() <= max+1)) {
265 (*c)->max =
max; (*c)->next = s;
271 *c =
t; c = &t->
next;
290 template<
class I,
class J>
305 while ((m < n) && !i[m]())
334 template<
class I,
class J>
RangeList * range(int min, int max, RangeList *&f)
Create new range possibly from freelist f and init.
const FloatNum max
Largest allowed float value.
int min(void) const
Return smallest value of range.
void operator|=(I &i)
Add iterator i.
void init(Region &r, I &i)
Initialize with single iterator i.
Base for range iterators with explicit min and max.
RangeListIter & operator=(const RangeListIter &i)
Assignment operator.
NaryUnion(void)
Default constructor.
void init(I &i, J &j)
Initialize with iterator i and j.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
NaryUnion & operator=(const NaryUnion &m)
Assignment operator (both iterators must be allocated from the same region)
Range iterator for union of iterators.
RangeList * copy(I &i)
Copy the iterator i to a range list.
int min
Minimum and maximum of a range.
Range iterator for computing union (binary)
RangeList * next
Next element.
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
void set(RangeList *l)
Set range lists.
void init(Region &r)
Initialize.
void operator++(void)
Move iterator to next range (if possible)
RangeList * two(I &i, J &j)
Return range list for union of two iterators.
int max(void) const
Return largest value of range.
void insert(I &i, RangeList *&u)
Insert ranges from i into u.
Gecode toplevel namespace
Union(void)
Default constructor.
RangeList * h
Head of range list.
Iterator over range lists.
RangeList * c
Current list element.
RangeList * f
Freelist used for allocation.