Gecode::Iter::Ranges::ScaleUp< Val, UnsVal, I > Class Template Reference
[Range iterators]
List of all members.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 souble precision (depending on the type Val (int or double) and on the type UnsVal (unsigned int or double).
Requires
#include "gecode/iter.hh"
Definition at line 38 of file ranges-scale.icc.
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). | |
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. | |
Constructor & Destructor Documentation
|
||||||||||
|
Default constructor.
Definition at line 113 of file ranges-scale.icc. |
|
||||||||||||||||
|
Initialize with ranges from i and scale factor a.
Definition at line 130 of file ranges-scale.icc. |
Member Function Documentation
|
||||||||||||||||
|
Initialize with ranges from i and scale factor a.
Definition at line 117 of file ranges-scale.icc. |
|
||||||||||
|
Test whether iterator is still at a range or done.
Definition at line 158 of file ranges-scale.icc. |
|
||||||||||
|
Move iterator to next range (if possible).
Definition at line 142 of file ranges-scale.icc. |
|
||||||||||
|
Return smallest value of range.
Definition at line 164 of file ranges-scale.icc. |
|
||||||||||
|
Return largest value of range.
Definition at line 169 of file ranges-scale.icc. |
|
||||||||||
|
Return width of range (distance between minimum and maximum).
Definition at line 174 of file ranges-scale.icc. |
Member Data Documentation
|
|||||
|
Iterator to be scaled.
Definition at line 41 of file ranges-scale.icc. |
|
|||||
|
Scale-factor.
Definition at line 43 of file ranges-scale.icc. |
|
|||||
|
Current value of range.
Definition at line 45 of file ranges-scale.icc. |
|
|||||
|
Last value of scaled range of i.
Definition at line 47 of file ranges-scale.icc. |
The documentation for this class was generated from the following file:
- gecode/iter/ranges-scale.icc (Revision: 3515)
