38 namespace Gecode {
namespace Iter {
namespace Ranges {
118 unsigned int width(
void)
const;
133 :
rlio(NULL),
h(NULL),
c(NULL) {}
137 : rlio(new (r.ralloc(sizeof(
RLIO)))
RLIO(r)), h(NULL),
c(NULL) {}
147 : rlio(i.rlio), h(i.h),
c(i.
c) {
211 return range(i.min(),i.max(),f);
217 return range(i.min(),i.max());
227 *c =
t; c = &t->
next;
258 return static_cast<unsigned int>(
c->
max-
c->
min)+1;
void rfree(void *p, size_t s)
Free memory previously allocated.
A & allocator(void)
Return allocator used.
RangeList * range(int min, int max, RangeList *&f)
Create new range possibly from freelist f and init.
int min(void) const
Return smallest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Shared object for allocation.
RangeListIter & operator=(const RangeListIter &i)
Assignment operator.
RangeList * get(void) const
Get head of current range list.
Gecode::FloatVal c(-8, 8)
Manage memory organized into block lists (allocator)
RLIO(Region &r)
Initialize.
Gecode::IntArgs i(4, 1, 2, 3, 4)
void reset(void)
Reset iterator to start.
RLIO * rlio
Reference to shared object.
RangeList * copy(I &i)
Copy the iterator i to a range list.
int min
Minimum and maximum of a range.
unsigned int use_cnt
Counter used for reference counting.
RangeList * next
Next element.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void set(RangeList *l)
Set range lists.
Client for block allocator of type T.
void init(Region &r)
Initialize.
int max(void) const
Return largest value of range.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
Gecode toplevel namespace
void operator++(void)
Move iterator to next range (if possible)
RangeList * h
Head of range list.
Iterator over range lists.
RangeList * c
Current list element.
void * ralloc(size_t s)
Allocate memory from region.
~RangeListIter(void)
Destructor.
RangeListIter(void)
Default constructor.