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 >.
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] |
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] |
Return smallest value of range.
Reimplemented in 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::Union, and Gecode::Iter::Ranges::Virt::NaryUnion.
Definition at line 103 of file ranges-minmax.icc.
int Gecode::Iter::Ranges::MinMax::max | ( | void | ) | const [inline] |
Return largest value of range.
Reimplemented in 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::Union, and Gecode::Iter::Ranges::Virt::NaryUnion.
Definition at line 107 of file ranges-minmax.icc.
unsigned int Gecode::Iter::Ranges::MinMax::width | ( | void | ) | const [inline] |
Return width of range (distance between minimum and maximum).
Reimplemented in 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::Union, and Gecode::Iter::Ranges::Virt::NaryUnion.
Definition at line 111 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: 4973)