Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I > Class Template Reference
Common functionality » Range and value iterators » Range iterators

Range iterator for pointwise product with a positive integer. More...

`#include <ranges-scale.hpp>`

## Protected Attributes

I | i
| Iterator to be scaled.
int | a
| Scale-factor.
Val | cur
| Current value of range.
Val | end
| Last value of scaled range of i.

## Constructors and initialization

| ScaleUp (void)
| Default constructor.
| ScaleUp (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

bool | operator() (void) const
| Test whether iterator is still at a range or done.
void | operator++ (void)
| Move iterator to next range (if possible).

## Range access

Val | min (void) const
| Return smallest value of range.
Val | max (void) const
| Return largest value of range.
UnsVal | width (void) const
| Return width of range (distance between minimum and maximum).

## Detailed Description

template<class Val, class UnsVal, class I>
class Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >

Range iterator for pointwise product with a positive integer.

Note that this iterator has a different interface as it can be used for both integer precision as well as double precision (depending on the type Val (`int` or `double`) and on the type UnsVal (`unsigned` `int` or `double`).

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

## Constructor & Destructor Documentation

## ScaleUp() [1/2]

template<class Val, class UnsVal, class I>

Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::ScaleUp | ( | void |  | ) |

inline

Default constructor.

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

## ScaleUp() [2/2]

template<class Val, class UnsVal, class I>

Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::ScaleUp | ( | I & | i,
|  | int | a )

inline

Initialize with ranges from i and scale factor a.

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

## Member Function Documentation

## init()

template<class Val, class UnsVal, class I>

void Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::init | ( | I & | i,
|  | int | a )

inline

Initialize with ranges from i and scale factor a.

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

## operator()()

template<class Val, class UnsVal, class I>

bool Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::operator() | ( | void |  | ) | const

inline

Test whether iterator is still at a range or done.

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

## operator++()

template<class Val, class UnsVal, class I>

void Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::operator++ | ( | void |  | ) |

inline

Move iterator to next range (if possible).

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

## min()

template<class Val, class UnsVal, class I>

Val Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::min | ( | void |  | ) | const

inline

Return smallest value of range.

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

## max()

template<class Val, class UnsVal, class I>

Val Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::max | ( | void |  | ) | const

inline

Return largest value of range.

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

## width()

template<class Val, class UnsVal, class I>

UnsVal Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::width | ( | void |  | ) | const

inline

Return width of range (distance between minimum and maximum).

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

## Member Data Documentation

## i

template<class Val, class UnsVal, class I>

I Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::i

protected

Iterator to be scaled.

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

## a

template<class Val, class UnsVal, class I>

int Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::a

protected

Scale-factor.

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

## cur

template<class Val, class UnsVal, class I>

Val Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::cur

protected

Current value of range.

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

## end

template<class Val, class UnsVal, class I>

Val Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I >::end

protected

Last value of scaled range of i.

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

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

- gecode/iter/ranges-scale.hpp