Generated on Wed Nov 1 15:05:21 2006 for Gecode by doxygen 1.4.5

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

List of all members.

Detailed Description

template<class I>
class Gecode::Iter::Ranges::Size< I >

Range iterator with size counting

Allows to iterate the ranges as defined by the input iterator and access the size of the set already iterated. After complete iteration, the reported size is thus the size of the set.

Requires

 #include "gecode/iter.hh" 

Definition at line 35 of file ranges-size.icc.

Constructors and initialization

 Size (void)
 Default constructor.
 Size (I &i)
 Initialize with ranges from i.
void init (I &i)
 Initialize with ranges from i.

Iteration control

bool operator() (void)
 Test whether iterator is still at a range or done.
void operator++ (void)
 Move iterator to next range (if possible).

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).

Size access

unsigned int size (void) const
 Return accumulated size.

Protected Attributes

i
 Iterator to compute size of.
unsigned int _size
 Accumulated size.


Constructor & Destructor Documentation

template<class I>
Gecode::Iter::Ranges::Size< I >::Size void   )  [inline]
 

Default constructor.

Definition at line 80 of file ranges-size.icc.

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

Initialize with ranges from i.

Definition at line 92 of file ranges-size.icc.


Member Function Documentation

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

Initialize with ranges from i.

Definition at line 85 of file ranges-size.icc.

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

Test whether iterator is still at a range or done.

Definition at line 102 of file ranges-size.icc.

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

Move iterator to next range (if possible).

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

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

Return smallest value of range.

Definition at line 108 of file ranges-size.icc.

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

Return largest value of range.

Definition at line 113 of file ranges-size.icc.

template<class I>
unsigned int Gecode::Iter::Ranges::Size< I >::width void   )  const [inline]
 

Return width of range (distance between minimum and maximum).

Definition at line 118 of file ranges-size.icc.

template<class I>
unsigned int Gecode::Iter::Ranges::Size< I >::size void   )  const [inline]
 

Return accumulated size.

Definition at line 124 of file ranges-size.icc.


Member Data Documentation

template<class I>
I Gecode::Iter::Ranges::Size< I >::i [protected]
 

Iterator to compute size of.

Definition at line 38 of file ranges-size.icc.

template<class I>
unsigned int Gecode::Iter::Ranges::Size< I >::_size [protected]
 

Accumulated size.

Definition at line 40 of file ranges-size.icc.


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