Generated on Mon Aug 25 11:35:52 2008 for Gecode by doxygen 1.5.6

Gecode::Iter::Ranges::Cache< I > Class Template Reference
[Range iterators]

List of all members.


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< Ranger
 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]

Default constructor.

Definition at line 96 of file ranges-cache.icc.

template<class I>
Gecode::Iter::Ranges::Cache< I >::Cache ( I &  i  )  [inline]

Initialize with ranges from i.

Definition at line 115 of file ranges-cache.icc.


Member Function Documentation

template<class I>
void Gecode::Iter::Ranges::Cache< I >::init ( I &  i  )  [inline]

Initialize with ranges from i.

Definition at line 100 of file ranges-cache.icc.

template<class I>
bool Gecode::Iter::Ranges::Cache< I >::operator() ( void   )  const [inline]

Test whether iterator is still at a range or done.

Definition at line 126 of file ranges-cache.icc.

template<class I>
void Gecode::Iter::Ranges::Cache< I >::operator++ ( void   )  [inline]

Move iterator to next range (if possible).

Definition at line 121 of file ranges-cache.icc.

template<class I>
void Gecode::Iter::Ranges::Cache< I >::reset ( void   )  [inline]

Reset iterator to start from beginning.

Definition at line 132 of file ranges-cache.icc.

template<class I>
int Gecode::Iter::Ranges::Cache< I >::min ( void   )  const [inline]

Return smallest value of range.

Definition at line 138 of file ranges-cache.icc.

template<class I>
int Gecode::Iter::Ranges::Cache< I >::max ( void   )  const [inline]

Return largest value of range.

Definition at line 143 of file ranges-cache.icc.

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]

Array for ranges.

Definition at line 58 of file ranges-cache.icc.

template<class I>
int Gecode::Iter::Ranges::Cache< I >::c [protected]

Current range.

Definition at line 60 of file ranges-cache.icc.


The documentation for this class was generated from the following file: