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, GlbRanges< View > >, Gecode::Iter::Ranges::Compl< Limits::Set::int_min, Limits::Set::int_max, I >, Gecode::Iter::Ranges::Compl< Limits::Set::int_min, Limits::Set::int_max, LubRanges< View > >, Gecode::Iter::Ranges::ComplVal< I >, Gecode::Iter::Ranges::Diff< I, J >, Gecode::Iter::Ranges::Diff< LubRanges< Set::SetVarImp * >, GlbRanges< Set::SetVarImp * > >, Gecode::Iter::Ranges::Diff< LubRanges< T >, 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 >, 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, 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 rangesminmax.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

Default constructor.
Definition at line 76 of file rangesminmax.icc. 

Initialize with range min to max.
Definition at line 79 of file rangesminmax.icc. 
Member Function Documentation

Set range such that iteration stops
Definition at line 71 of file rangesminmax.icc. 

Test whether iterator is still at a range or done.
Definition at line 83 of file rangesminmax.icc. 

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 88 of file rangesminmax.icc. 

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 92 of file rangesminmax.icc. 

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 96 of file rangesminmax.icc. 
Member Data Documentation

Minimum of current range.
Definition at line 39 of file rangesminmax.icc. 

Maximum of current range.
Definition at line 41 of file rangesminmax.icc. 
The documentation for this class was generated from the following file:
 gecode/iter/rangesminmax.icc (Revision: 3515)