Generated on Tue Sep 25 2012 20:53:32 for Gecode by doxygen 1.7.5
Gecode::Iter::Ranges::ScaleUp Class Reference

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

#include <ranges-scale.hpp>

List of all members.

Protected Attributes

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

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).


Constructor & Destructor Documentation

Gecode::Iter::Ranges::ScaleUp::ScaleUp ( void  ) [inline]

Default constructor.

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

Gecode::Iter::Ranges::ScaleUp::ScaleUp ( I &  i,
int  a 
) [inline]

Initialize with ranges from i and scale factor a.

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


Member Function Documentation

void Gecode::Iter::Ranges::ScaleUp::init ( I &  i,
int  a 
) [inline]

Initialize with ranges from i and scale factor a.

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

bool Gecode::Iter::Ranges::ScaleUp::operator() ( void  ) const [inline]

Test whether iterator is still at a range or done.

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

void Gecode::Iter::Ranges::ScaleUp::operator++ ( void  ) [inline]

Move iterator to next range (if possible)

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

Val Gecode::Iter::Ranges::ScaleUp::min ( void  ) const [inline]

Return smallest value of range.

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

Val Gecode::Iter::Ranges::ScaleUp::max ( void  ) const [inline]

Return largest value of range.

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

UnsVal Gecode::Iter::Ranges::ScaleUp::width ( void  ) const [inline]

Return width of range (distance between minimum and maximum)

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


Member Data Documentation

Iterator to be scaled.

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

Scale-factor.

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

Current value of range.

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

Last value of scaled range of i.

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


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