38 namespace Gecode {
namespace Iter {
namespace Ranges {
88 void init(I& i,
int min,
int max);
100 mi = r_min +
i.min();
101 ma = r_max +
i.max();
103 while (
i() && (ma+1 >= r_min+
i.min())) {
104 ma = r_max +
i.max(); ++
i;
114 :
i(i0), r_min(r_min0), r_max(r_max0) {
121 i = i0; r_min = r_min0; r_max = r_max0;
SubRange(void)
Default constructor.
Range iterator for adding a single range to a range iterator.
int max(void) const
Return largest value of range.
void init(I &i, int min, int max)
Initialize with ranges i and range min to max.
Base for range iterators with explicit min and max.
void operator++(void)
Move iterator to next range (if possible)
I i
Iterator to which the range is to be added.
AddRange(void)
Default constructor.
int min(void) const
Return smallest value of range.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void init(I &i, int min, int max)
Initialize with ranges i and range min to max.
Range iterator for subtracting a single range from a range iterator.
int r_min
Minimum of range to be added.
Gecode toplevel namespace
int r_max
Maximum of range to be added.