Generated on Tue May 22 09:41:36 2018 for Gecode by doxygen 1.6.3

Gecode::Iter::Ranges::MinMax Class Reference
[Range iterators]

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.

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


Constructor & Destructor Documentation

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

Default constructor.

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

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

Initialize with range min to max.

Definition at line 90 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 82 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 94 of file ranges-minmax.hpp.

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

Return smallest value of range.

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

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

Return largest value of range.

Definition at line 103 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 107 of file ranges-minmax.hpp.


Member Data Documentation

Minimum of current range.

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

Maximum of current range.

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


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