Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Gecode::Iter::Ranges::ScaleDown< I > Class Template Reference

Range iterator for pointwise division by a positive integer. More...

#include <ranges-scale.hpp>

Protected Attributes

i
 Iterator to be scaled down.
 
int a
 Divide by this factor.
 
- Protected Attributes inherited from Gecode::Iter::Ranges::MinMax
int mi
 Minimum of current range.
 
int ma
 Maximum of current range.
 

Constructors and initialization

 ScaleDown (void)
 Default constructor.
 
 ScaleDown (I &i, int a)
 Initialize with ranges from i and scale factor a.
 
void init (I &i, int a)
 Initialize with ranges from i and scale factor a.
 

Iteration control

void operator++ (void)
 Move iterator to next range (if possible)
 

Additional Inherited Members

- Public Member Functions inherited from Gecode::Iter::Ranges::MinMax
 MinMax (void)
 Default constructor.
 
 MinMax (int min, int max)
 Initialize with range min to max.
 
bool operator() (void) const
 Test whether iterator is still at a range or done.
 
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 inherited from Gecode::Iter::Ranges::MinMax
void finish (void)
 Set range such that iteration stops
 

Detailed Description

template<class I>
class Gecode::Iter::Ranges::ScaleDown< I >

Range iterator for pointwise division by a positive integer.

Definition at line 95 of file ranges-scale.hpp.

Constructor & Destructor Documentation

◆ ScaleDown() [1/2]

template<class I >
Gecode::Iter::Ranges::ScaleDown< I >::ScaleDown ( void )
inline

Default constructor.

Definition at line 215 of file ranges-scale.hpp.

◆ ScaleDown() [2/2]

template<class I >
Gecode::Iter::Ranges::ScaleDown< I >::ScaleDown ( I & i,
int a )
inline

Initialize with ranges from i and scale factor a.

Definition at line 226 of file ranges-scale.hpp.

Member Function Documentation

◆ init()

template<class I >
void Gecode::Iter::Ranges::ScaleDown< I >::init ( I & i,
int a )
inline

Initialize with ranges from i and scale factor a.

Definition at line 219 of file ranges-scale.hpp.

◆ operator++()

template<class I >
void Gecode::Iter::Ranges::ScaleDown< I >::operator++ ( void )
inline

Move iterator to next range (if possible)

Definition at line 194 of file ranges-scale.hpp.

Member Data Documentation

◆ i

template<class I >
I Gecode::Iter::Ranges::ScaleDown< I >::i
protected

Iterator to be scaled down.

Definition at line 98 of file ranges-scale.hpp.

◆ a

template<class I >
int Gecode::Iter::Ranges::ScaleDown< I >::a
protected

Divide by this factor.

Definition at line 100 of file ranges-scale.hpp.


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