Range iterator cache More...
#include <ranges-cache.hpp>
Constructors and initialization | |
Cache (void) | |
Default constructor. | |
Cache (const Cache &m) | |
Copy constructor. | |
template<class I > | |
Cache (Region &r, I &i) | |
Initialize with ranges from i. | |
template<class I > | |
void | init (Region &r, I &i) |
Initialize with ranges from i. | |
Cache & | operator= (const Cache &m) |
Assignment operator (both caches must be allocated from the same region) | |
Additional Inherited Members | |
![]() | |
RangeListIter (void) | |
Default constructor. | |
RangeListIter (const RangeListIter &i) | |
Copy constructor. | |
RangeListIter (Region &r) | |
Initialize. | |
void | init (Region &r) |
Initialize. | |
RangeListIter & | operator= (const RangeListIter &i) |
Assignment operator. | |
bool | operator() (void) const |
Test whether iterator is still at a range or done. | |
void | operator++ (void) |
Move iterator to next range (if possible) | |
void | reset (void) |
Reset iterator to start. | |
int | min (void) const |
Return smallest value of range. | |
int | max (void) const |
Return largest value of range. | |
unsigned int | width (void) const |
Return width of range (distance between minimum and maximum) | |
~RangeListIter (void) | |
Destructor. | |
![]() | |
void | set (RangeList *l) |
Set range lists. | |
RangeList * | get (void) const |
Get head of current range list. | |
RangeList * | range (int min, int max, RangeList *&f) |
Create new range possibly from freelist f and init. | |
RangeList * | range (int min, int max) |
Create new range possibly and init. | |
template<class I > | |
RangeList * | range (I &i, RangeList *&f) |
Create new range possibly from freelist f and init. | |
template<class I > | |
RangeList * | range (I &i) |
Create new range possibly and init. | |
template<class I > | |
RangeList * | copy (I &i) |
Copy the iterator i to a range list. | |
![]() | |
RLIO * | rlio |
Reference to shared object. | |
RangeList * | h |
Head of range list. | |
RangeList * | c |
Current list element. | |
Range iterator cache
Allows to iterate the ranges as defined by the input iterator several times provided the Cache is reset by the reset member function.
Definition at line 45 of file ranges-cache.hpp.
|
inline |
Default constructor.
Definition at line 66 of file ranges-cache.hpp.
|
inline |
Copy constructor.
Definition at line 69 of file ranges-cache.hpp.
|
inline |
Initialize with ranges from i.
Definition at line 90 of file ranges-cache.hpp.
void Gecode::Iter::Ranges::Cache::init | ( | Region & | r, |
I & | i ) |
Initialize with ranges from i.
Definition at line 74 of file ranges-cache.hpp.
Assignment operator (both caches must be allocated from the same region)
Definition at line 95 of file ranges-cache.hpp.