Generated on Sat Aug 25 2012 15:53:13 for Gecode by doxygen 1.7.5
Gecode::Iter::Ranges::MinMax Class Reference

Base for range iterators with explicit min and max. More...

#include <ranges-minmax.hpp>

List of all members.

Protected Member Functions

void finish (void)
 Set range such that iteration stops

Protected Attributes

int mi
 Minimum of current range.
int ma
 Maximum of current range.

Constructors and initialization

 MinMax (void)
 Default constructor.
 MinMax (int min, int max)
 Initialize with range min to max.

Iteration control

bool operator() (void) const
 Test whether iterator is still at a range or done.

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

Base for range iterators with explicit min and max.

The iterator provides members mi and ma for storing the limits of the currently iterated range. The iterator continues until mi becomes greater than ma. The member function finish does exactly that.


Constructor & Destructor Documentation

Gecode::Iter::Ranges::MinMax::MinMax ( void  ) [inline]

Default constructor.

Definition at line 91 of file ranges-minmax.hpp.

Gecode::Iter::Ranges::MinMax::MinMax ( int  min,
int  max 
) [inline]

Initialize with range min to max.

Definition at line 94 of file ranges-minmax.hpp.


Member Function Documentation

void Gecode::Iter::Ranges::MinMax::finish ( void  ) [inline, protected]

Set range such that iteration stops

Definition at line 86 of file ranges-minmax.hpp.

bool Gecode::Iter::Ranges::MinMax::operator() ( void  ) const [inline]

Test whether iterator is still at a range or done.

Definition at line 98 of file ranges-minmax.hpp.

int Gecode::Iter::Ranges::MinMax::min ( void  ) const [inline]

Return smallest value of range.

Definition at line 103 of file ranges-minmax.hpp.

int Gecode::Iter::Ranges::MinMax::max ( void  ) const [inline]

Return largest value of range.

Definition at line 107 of file ranges-minmax.hpp.

unsigned int Gecode::Iter::Ranges::MinMax::width ( void  ) const [inline]

Return width of range (distance between minimum and maximum)

Definition at line 111 of file ranges-minmax.hpp.


Member Data Documentation

Minimum of current range.

Definition at line 54 of file ranges-minmax.hpp.

Maximum of current range.

Definition at line 56 of file ranges-minmax.hpp.


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