Generated on Mon Aug 25 11:35:52 2008 for Gecode by doxygen 1.5.6

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

Inherited by Gecode::Iter::Ranges::AddRange< Gecode::I< P > >, Gecode::Iter::Ranges::Compl< Limits::min, Limits::max, Gecode::I< P > >, Gecode::Iter::Ranges::Compl< Limits::min, Limits::max, Gecode::Set::GlbRanges< View > >, Gecode::Iter::Ranges::Compl< Limits::min, Limits::max, Gecode::Set::LubRanges< View > >, 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::AddRange< I >, Gecode::Iter::Ranges::Append< I, J >, Gecode::Iter::Ranges::Compl< UMIN, UMAX, I >, Gecode::Iter::Ranges::ComplVal< I >, Gecode::Iter::Ranges::Diff< I, J >, Gecode::Iter::Ranges::Inter< I, J >, Gecode::Iter::Ranges::Map< I, M, false >, 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::SingletonAppend< J >, Gecode::Iter::Ranges::Union< I, J >, Gecode::Iter::Ranges::Virt::Compl< UMIN, UMAX >, Gecode::Iter::Ranges::Virt::ComplVal, Gecode::Iter::Ranges::Virt::Inter, Gecode::Iter::Ranges::Virt::NaryInter, Gecode::Iter::Ranges::Virt::NaryUnion, Gecode::Iter::Ranges::Virt::Union, Gecode::Iter::Values::ToRanges< I >, Gecode::Iter::Values::ToRanges< Gecode::CpltSet::GlbValues< Gecode::CpltSet::CpltSetVarImp * > >, Gecode::Iter::Values::ToRanges< Gecode::CpltSet::LubValues< Gecode::CpltSet::CpltSetVarImp * > >, Gecode::Iter::Values::ToRanges< Gecode::CpltSet::UnknownValues< Gecode::CpltSet::CpltSetVarImp * > >, and Gecode::Iter::Values::ToRanges< Test::Set::CountableSetValues >.

List of all members.


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 51 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]

Default constructor.

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

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

Initialize with range min to max.

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


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

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

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]


Member Data Documentation

Minimum of current range.

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

Maximum of current range.

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


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