36namespace Gecode {
namespace Iter {
namespace Ranges {
48 template<
class Val,
class UnsVal,
class I>
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));
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Base for range iterators with explicit min and max.
Range iterator for pointwise division by a positive integer.
void operator++(void)
Move iterator to next range (if possible)
int a
Divide by this factor.
I i
Iterator to be scaled down.
void init(I &i, int a)
Initialize with ranges from i and scale factor a.
ScaleDown(void)
Default constructor.
Range iterator for pointwise product with a positive integer.
void operator++(void)
Move iterator to next range (if possible)
bool operator()(void) const
Test whether iterator is still at a range or done.
Val max(void) const
Return largest value of range.
ScaleUp(void)
Default constructor.
UnsVal width(void) const
Return width of range (distance between minimum and maximum)
Val end
Last value of scaled range of i.
ScaleUp(I &i, int a)
Initialize with ranges from i and scale factor a.
Val min(void) const
Return smallest value of range.
Val cur
Current value of range.
I i
Iterator to be scaled.
void init(I &i, int a)
Initialize with ranges from i and scale factor a.
Gecode toplevel namespace