Generated on Mon Nov 30 23:53:53 2009 for Gecode by doxygen 1.6.1

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

Range iterator for pointwise minus of a range iterator. More...

#include <ranges-minus.hpp>

List of all members.

Constructors and initialization



 Minus (void)
 Default constructor.
 Minus (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).

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

Detailed Description

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

Range iterator for pointwise minus of a range iterator.

This iterator in effect changes the order of how ranges are iterated: the first range of the input iterator defines the last range of the Minus iterator. Upon initialization all ranges of the input iterator are stored in an array which later allows iteration in inverse direction.

Definition at line 53 of file ranges-minus.hpp.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 100 of file ranges-minus.hpp.

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

Initialize with ranges from i.

Definition at line 119 of file ranges-minus.hpp.


Member Function Documentation

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

Initialize with ranges from i.

Definition at line 104 of file ranges-minus.hpp.

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

Test whether iterator is still at a range or done.

Definition at line 130 of file ranges-minus.hpp.

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

Move iterator to next range (if possible).

Definition at line 125 of file ranges-minus.hpp.

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

Return smallest value of range.

Definition at line 136 of file ranges-minus.hpp.

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

Return largest value of range.

Definition at line 141 of file ranges-minus.hpp.

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

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

Definition at line 146 of file ranges-minus.hpp.


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