36namespace Gecode {
namespace Iter {
namespace Ranges {
43 template<
class I,
class J>
87 template<
class I,
class J>
96 template<
class I,
class J>
116 template<
class I,
class J>
119 if (!
i() || !j())
goto done;
121 while (
i() && (
i.max() < j.min())) ++
i;
123 while (j() && (j.max() <
i.min())) ++j;
125 }
while (
i.max() < j.min());
129 if (
i.max() < j.max()) ++
i;
else ++j;
135 template<
class I,
class J>
139 template<
class I,
class J>
146 template<
class I,
class J>
170 template<
class I,
class J>
179 while (
i() && (
i.max() < j.min())) ++
i;
181 while (j() && (j.max() <
i.min())) ++j;
183 }
while (
i.max() < j.min());
187 *
c =
t;
c = &
t->next;
188 if (
i.max() < j.max()) ++
i;
else ++j;
200 if ((
n > 0) &&
i[0]()) {
204 int min =
i[0].min();
207 int max =
i[0].max();
210 for (
int j=
n; j--;) {
212 while (
i[j]() && (
i[j].
max() <
min))
228 *
c =
t;
c = &
t->next;
243 template<
class I,
class J>
261 while (
i() && (j != NULL)) {
263 while (
i() && (
i.max() < j->
min))
266 while ((j != NULL) && (j->
max <
i.min())) {
271 if (j == NULL)
goto done;
272 }
while (
i.max() < j->
min);
276 *
c =
t;
c = &
t->next;
277 if (
i.max() < j->
max) {
int n
Number of negative literals for node type.
Range iterator for computing intersection (binary)
void operator++(void)
Move iterator to next range (if possible)
void init(I &i, J &j)
Initialize with iterator i and j.
Inter(void)
Default constructor.
Base for range iterators with explicit min and max.
Range iterator for intersection of iterators.
NaryInter & operator=(const NaryInter &m)
Assignment operator (both iterators must be allocated from the same region)
NaryInter(void)
Default constructor.
void init(Region &r, I &i)
Initialize with single iterator i.
void operator&=(I &i)
Add iterator i.
int min
Minimum and maximum of a range.
RangeList * next
Next element.
Iterator over range lists.
RangeList * copy(I &i)
Copy the iterator i to a range list.
int max(void) const
Return largest value of range.
RangeList * get(void) const
Get head of current range list.
void init(Region &r)
Initialize.
RangeListIter & operator=(const RangeListIter &i)
Assignment operator.
RangeList * range(int min, int max, RangeList *&f)
Create new range possibly from freelist f and init.
void set(RangeList *l)
Set range lists.
RangeList * c
Current list element.
RangeList * h
Head of range list.
int min(void) const
Return smallest value of range.
const FloatNum max
Largest allowed float value.
const FloatNum min
Smallest allowed float value.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
Gecode::IntArgs i({1, 2, 3, 4})