36 namespace Gecode {
namespace Iter {
namespace Ranges {
48 template<
class Val,
class UnsVal,
class I>
67 void init(I& i,
int a);
85 UnsVal
width(
void)
const;
109 void init(I& i,
int a);
121 template<
class Val,
class UnsVal,
class I>
125 template<
class Val,
class UnsVal,
class I>
138 template<
class Val,
class UnsVal,
class I>
150 template<
class Val,
class UnsVal,
class I>
166 template<
class Val,
class UnsVal,
class I>
169 return (
a == 1) ?
i() : (cur <= end);
172 template<
class Val,
class UnsVal,
class I>
175 return (
a == 1) ?
static_cast<Val
>(
i.min()) : cur;
177 template<
class Val,
class UnsVal,
class I>
180 return (
a == 1) ?
static_cast<Val
>(
i.max()) : cur;
182 template<
class Val,
class UnsVal,
class I>
186 static_cast<UnsVal
>(
i.width()) :
187 static_cast<UnsVal>(1);
196 while ((mi > ma) &&
i()) {
197 mi =
static_cast<int>(ceil(static_cast<double>(
i.min())/
a));
198 ma =
static_cast<int>(floor(static_cast<double>(
i.max())/
a));
202 int n_mi =
static_cast<int>(ceil(static_cast<double>(
i.min())/
a));
205 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::@585::NNF::@62::@64 a
For atomic nodes.
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
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)