34namespace Gecode {
namespace Iter {
namespace Ranges {
44 template<
class I,
class M,
bool strict=true>
54 Map(I& i,
const M& m);
58 void init(I& i,
const M& m);
81 template<
class I,
class M>
98 Map(I& i,
const M& m);
102 void init(I& i,
const M& m);
113 template<
class I,
class M>
128 Map(I& i,
const M& m);
132 void init(I& i,
const M& m);
150 unsigned int width(
void)
const;
155 template<
class I,
class M>
159 template<
class I,
class M>
166 while (i() && (ma+1 >= m.min(i.min()))) {
167 ma = m.max(i.max()); ++i;
174 template<
class I,
class M>
179 template<
class I,
class M>
185 template<
class I,
class M>
190 template<
class I,
class M>
196 template<
class I,
class M>
204 template<
class I,
class M>
208 template<
class I,
class M>
213 template<
class I,
class M>
219 template<
class I,
class M>
222 template<
class I,
class M>
226 template<
class I,
class M>
231 template<
class I,
class M>
237 template<
class I,
class M>
240 return m.min(i.min());
242 template<
class I,
class M>
245 return m.max(i.max());
247 template<
class I,
class M>
250 return static_cast<unsigned int>(
max()-
min())+1;
Range iterator for mapping ranges.
Map(I &i, const M &m)
Initialize with ranges from i and map m.
bool operator()(void) const
Test whether iterator is still at a range or done.
void init(I &i, const M &m)
Initialize with ranges from i and map m.
void init(I &i)
Initialize with ranges from i.
int min(void) const
Return smallest value of range.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
void operator++(void)
Move iterator to next range (if possible)
int max(void) const
Return largest value of range.
Map(I &i)
Initialize with ranges from i.
Map(void)
Default constructor.
Base for range iterators with explicit min and max.
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .