38 namespace Gecode {
namespace Iter {
namespace Ranges {
46 template<
class I,
class J>
61 void init(I& i, J& j);
73 template<
class I,
class J>
88 while (j() && (j.max() < mi))
90 if (j() && (j.min() <= ma)) {
93 if ((mi >= j.min()) && (ma <= j.max()))
100 if (j() && (j.min() <= ma))
111 template<
class I,
class J>
115 template<
class I,
class J>
127 template<
class I,
class J>
134 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.