40 namespace Gecode {
namespace Iter {
namespace Ranges {
52 template<
class Val,
class UnsVal,
class I>
89 UnsVal
width(
void)
const;
125 template<
class Val,
class UnsVal,
class I>
129 template<
class Val,
class UnsVal,
class I>
142 template<
class Val,
class UnsVal,
class I>
154 template<
class Val,
class UnsVal,
class I>
170 template<
class Val,
class UnsVal,
class I>
173 return (
a == 1) ?
i() : (cur <= end);
176 template<
class Val,
class UnsVal,
class I>
179 return (
a == 1) ? static_cast<Val>(
i.min()) : cur;
181 template<
class Val,
class UnsVal,
class I>
184 return (
a == 1) ? static_cast<Val>(
i.max()) : cur;
186 template<
class Val,
class UnsVal,
class I>
190 static_cast<UnsVal>(
i.width()) :
191 static_cast<UnsVal>(1);
200 while ((mi > ma) &&
i()) {
201 mi = static_cast<int>(ceil(static_cast<double>(
i.min())/
a));
202 ma = static_cast<int>(floor(static_cast<double>(
i.max())/
a));
206 int n_mi = static_cast<int>(ceil(static_cast<double>(
i.min())/
a));
209 int n_ma = static_cast<int>(floor(static_cast<double>(
i.max())/
a));
const FloatNum max
Largest allowed float value.
UnsVal width(void) const
Return width of range (distance between minimum and maximum)
Base for range iterators with explicit min and max.
Val cur
Current value of range.
Val end
Last value of scaled range of i.
Val max(void) const
Return largest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
Val min(void) const
Return smallest value of range.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Range iterator for pointwise product with a positive integer.
Range iterator for pointwise division by a positive integer.
ScaleUp(void)
Default constructor.
struct Gecode::@511::NNF::@54::@56 a
For atomic nodes.
void init(I &i, int a)
Initialize with ranges from i and scale factor a.
void init(I &i, int a)
Initialize with ranges from i and scale factor a.
I i
Iterator to be scaled.
int a
Divide by this factor.
Gecode toplevel namespace
ScaleDown(void)
Default constructor.
I i
Iterator to be scaled down.
void operator++(void)
Move iterator to next range (if possible)
void operator++(void)
Move iterator to next range (if possible)