34 namespace Gecode {
namespace Iter {
namespace Ranges {
42 template<
class I,
class J>
57 void init(I& i, J& j);
69 template<
class I,
class J>
84 while (
j() && (
j.max() <
mi))
86 if (
j() && (
j.min() <=
ma)) {
89 if ((
mi >=
j.min()) && (
ma <=
j.max()))
96 if (
j() && (
j.min() <=
ma))
107 template<
class I,
class J>
111 template<
class I,
class J>
118 mi =
i.min()-1; ma = mi;
123 template<
class I,
class J>
130 mi =
i.min()-1; ma = mi;
J j
Iterator to be subtracted.
Diff(void)
Default constructor.
void operator++(void)
Move iterator to next range (if possible)
I i
Iterator from which to subtract.
Base for range iterators with explicit min and max.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void finish(void)
Set range such that iteration stops
int mi
Minimum of current range.
Gecode toplevel namespace
Range iterator for computing set difference.
void init(I &i, J &j)
Initialize with iterator i and j.
int ma
Maximum of current range.