Gecode::Iter::Ranges::MinMax Class Reference
[Range iterators]
Inherited by Gecode::Iter::Ranges::AddRange< I >, Gecode::Iter::Ranges::Append< I, J >, Gecode::Iter::Ranges::Compl< UMIN, UMAX, I >, Gecode::Iter::Ranges::Compl< Limits::Set::int_min, Limits::Set::int_max, Gecode::Set::GlbRanges< View > >, Gecode::Iter::Ranges::Compl< Limits::Set::int_min, Limits::Set::int_max, Gecode::Set::LubRanges< View > >, Gecode::Iter::Ranges::Compl< Limits::Set::int_min, Limits::Set::int_max, I >, Gecode::Iter::Ranges::ComplVal< I >, Gecode::Iter::Ranges::Diff< I, J >, Gecode::Iter::Ranges::Diff< Gecode::Set::LubRanges< Gecode::Set::SetVarImp * >, Gecode::Set::GlbRanges< Gecode::Set::SetVarImp * > >, Gecode::Iter::Ranges::Diff< Gecode::Set::LubRanges< T >, Gecode::Set::GlbRanges< T > >, Gecode::Iter::Ranges::Inter< I, J >, Gecode::Iter::Ranges::NaryAppend< I >, Gecode::Iter::Ranges::NaryInter< I >, Gecode::Iter::Ranges::NaryUnion< I >, Gecode::Iter::Ranges::ScaleDown< I >, Gecode::Iter::Ranges::Singleton, Gecode::Iter::Ranges::Union< I, J >, and Gecode::Iter::Values::ToRanges< I >.
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.
Requires
#include "gecode/iter.hh"
Definition at line 36 of file ranges-minmax.icc.
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). | |
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. |
Constructor & Destructor Documentation
Gecode::Iter::Ranges::MinMax::MinMax | ( | void | ) | [inline] |
Gecode::Iter::Ranges::MinMax::MinMax | ( | int | min, | |
int | max | |||
) | [inline] |
Member Function Documentation
void Gecode::Iter::Ranges::MinMax::finish | ( | void | ) | [inline, protected] |
bool Gecode::Iter::Ranges::MinMax::operator() | ( | void | ) | const [inline] |
int Gecode::Iter::Ranges::MinMax::min | ( | void | ) | const [inline] |
int Gecode::Iter::Ranges::MinMax::max | ( | void | ) | const [inline] |
unsigned int Gecode::Iter::Ranges::MinMax::width | ( | void | ) | const [inline] |
Return width of range (distance between minimum and maximum).
Definition at line 96 of file ranges-minmax.icc.
Member Data Documentation
int Gecode::Iter::Ranges::MinMax::mi [protected] |
int Gecode::Iter::Ranges::MinMax::ma [protected] |
The documentation for this class was generated from the following file:
- gecode/iter/ranges-minmax.icc (Revision: 3188)