Public Member Functions

ConstMappingIterator Class Reference
[mapping - classes representing mathematical mappings]

Defines an const iterator for a ConstMapping which is able to iterate over the Mapping. More...

#include <MappingBase.h>

Inherited by MappingIterator, RSAMConstMappingIterator, and SimpleConstMappingIterator.

List of all members.

Public Member Functions

virtual const ArgumentgetNextPosition () const =0
 Returns the position the next call to "next()" of this Iterator would iterate to.
virtual void jumpTo (const Argument &pos)=0
 Lets the iterator point to the passed position.
virtual void jumpToBegin ()=0
 Lets the iterator point to the begin of the mapping.
virtual void iterateTo (const Argument &pos)=0
 Iterates to the specified position. This method should be used if the new position is near the current position. Furthermore the new position has to be compared bigger than the old position.
virtual void next ()=0
 Iterates to the next position of the Mapping.
virtual bool inRange () const =0
 Returns true if the current position of the iterator is in range of the function.
virtual bool hasNext () const =0
 Returns true if the iterator has a next value it can iterate to on a call to "next()".
virtual const ArgumentgetPosition () const =0
 Returns the current position of the iterator.
virtual double getValue () const =0
 Returns the value of the Mapping at the current position.

Detailed Description

Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.

Iterators provide a fast way to iterate over every "entry" or important position of a Mapping. They also provide constant complexity for accessing the Mapping at the position of the Iterator.

Every implementation of an mapping-Iterator provides the same ordering when iterating over a Mapping. This is that, if the iterator is increased, the position of the entry it points to has to be also "increased". Which means that the new position has to be compared bigger than the previous position (see class Argument for comparison of positions).

"Const" means that you can not change the values of the underlying Mapping with this iterator.

Author:
Karl Wessel

Definition at line 543 of file MappingBase.h.


Member Function Documentation

virtual double ConstMappingIterator::getValue (  )  const [pure virtual]
virtual bool ConstMappingIterator::inRange (  )  const [pure virtual]
virtual void ConstMappingIterator::jumpTo ( const Argument pos  )  [pure virtual]
virtual void ConstMappingIterator::jumpToBegin (  )  [pure virtual]

Lets the iterator point to the begin of the mapping.

The beginning of the mapping depends on the implementation. With an implementation based on a number of key-entries, this could be the key entry with the smallest position (see class Argument for ordering of positions).

Implemented in SimpleConstMappingIterator, TimeMappingIterator< Interpolator >, LinearIntplMappingIterator, ConstMappingIteratorWrapper, MultiDimMappingIterator< Interpolator >, RSAMConstMappingIterator, and MultiDimMappingIterator< Linear >.

Referenced by ConstMappingIteratorWrapper::jumpToBegin().

virtual void ConstMappingIterator::next (  )  [pure virtual]

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