Gecode::Iter::Ranges::Cache< I > Class Template Reference
[Range iterators]
Detailed Description
template<class I>
class Gecode::Iter::Ranges::Cache< I >
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 50 of file ranges-cache.icc.
Constructors and initialization | |
Cache (void) | |
Default constructor. | |
Cache (I &i) | |
Initialize with ranges from i. | |
void | init (I &i) |
Initialize with ranges from i. | |
Iteration control | |
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 from beginning. | |
Range access | |
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). | |
Protected Attributes | |
SharedArray< Range > | r |
Array for ranges. | |
int | c |
Current range. | |
Classes | |
class | Range |
Ranges stored in cache More... |
Constructor & Destructor Documentation
template<class I>
Gecode::Iter::Ranges::Cache< I >::Cache | ( | void | ) | [inline] |
template<class I>
Gecode::Iter::Ranges::Cache< I >::Cache | ( | I & | i | ) | [inline] |
Member Function Documentation
template<class I>
void Gecode::Iter::Ranges::Cache< I >::init | ( | I & | i | ) | [inline] |
template<class I>
bool Gecode::Iter::Ranges::Cache< I >::operator() | ( | void | ) | const [inline] |
template<class I>
void Gecode::Iter::Ranges::Cache< I >::operator++ | ( | void | ) | [inline] |
template<class I>
void Gecode::Iter::Ranges::Cache< I >::reset | ( | void | ) | [inline] |
template<class I>
int Gecode::Iter::Ranges::Cache< I >::min | ( | void | ) | const [inline] |
template<class I>
int Gecode::Iter::Ranges::Cache< I >::max | ( | void | ) | const [inline] |
template<class I>
unsigned int Gecode::Iter::Ranges::Cache< I >::width | ( | void | ) | const [inline] |
Return width of range (distance between minimum and maximum).
Definition at line 148 of file ranges-cache.icc.
Member Data Documentation
template<class I>
SharedArray<Range> Gecode::Iter::Ranges::Cache< I >::r [protected] |
template<class I>
int Gecode::Iter::Ranges::Cache< I >::c [protected] |
The documentation for this class was generated from the following file:
- gecode/iter/ranges-cache.icc (Revision: 5262)