INET Framework for OMNeT++/OMNEST
|
Provides an implementation of the MappingIterator- Interface which is able to iterate over FrequencyMappings. More...
#include <MappingUtils.h>
Public Member Functions | |
FrequencyMappingIterator (const iterator &it) | |
Initializes the Iterator to use the passed InterpolateableMapIterator. More... | |
FrequencyMappingIterator (const FrequencyMappingIterator< Interpolator > &o) | |
virtual | ~FrequencyMappingIterator () |
void | jumpTo (const Argument &pos) override |
Lets the iterator point to the passed position. More... | |
void | iterateTo (const Argument &pos) override |
Iterates to the specified position. More... | |
virtual void | next () override |
Iterates to the next position of the function. More... | |
virtual bool | inRange () const override |
Returns true if the current position of the iterator is in range of the function. More... | |
virtual const Argument & | getPosition () const override |
Returns the current position of the iterator. More... | |
virtual const Argument & | getNextPosition () const override |
Returns the next position a call to "next()" would jump to. More... | |
virtual mapped_type | getValue () const override |
Returns the value of the function at the current position. More... | |
virtual void | jumpToBegin () override |
Lets the iterator point to the begin of the mapping. More... | |
virtual bool | hasNext () const override |
Returns true if the iterator has a next value inside its range a call to "next()" can jump to. More... | |
virtual void | setValue (argument_value_cref_t value) override |
Changes the value of the function at the current position. More... | |
Public Member Functions inherited from inet::physicallayer::MappingIterator | |
MappingIterator () | |
virtual | ~MappingIterator () |
virtual void | setValue (argument_value_cref_t value)=0 |
Changes the value of the Mapping at the current position. More... | |
Public Member Functions inherited from inet::physicallayer::ConstMappingIterator | |
ConstMappingIterator () | |
virtual | ~ConstMappingIterator () |
ConstMappingIterator (const ConstMappingIterator &) | |
Copy constructor. More... | |
ConstMappingIterator & | operator= (const ConstMappingIterator &) |
ConstMappingIterator assignment operator. More... | |
void | swap (ConstMappingIterator &) |
Swaps data with another ConstMappingIterator. More... | |
Protected Types | |
typedef InterpolateableMap< Interpolator< std::map< argument_value_t, argument_value_t > > > | interpolator_map_type |
The templated InterpolateableMap the underlying Mapping uses std::map as storage type. More... | |
typedef interpolator_map_type::interpolator_type | interpolator_type |
typedef interpolator_map_type::mapped_type | mapped_type |
typedef interpolator_map_type::iterator_intpl | iterator |
typedef interpolator_map_type::const_iterator_intpl | const_iterator |
Protected Member Functions | |
void | updateNextPos () |
Protected Attributes | |
iterator | valueIt |
Stores the current position iterator inside the Mapping. More... | |
Argument | position |
Stores the current position of the iterator. More... | |
Argument | nextPosition |
Stores the next position a call of "next()" would jump to. More... | |
bool | isStepMapping |
Stores if this mapping represents a step function. More... | |
bool | atPreStep |
Additional Inherited Members | |
Public Types inherited from inet::physicallayer::ConstMappingIterator | |
typedef Argument::mapped_type | argument_value_t |
typedef Argument::mapped_type_cref | argument_value_cref_t |
Provides an implementation of the MappingIterator- Interface which is able to iterate over FrequencyMappings.
|
protected |
|
protected |
The templated InterpolateableMap the underlying Mapping uses std::map as storage type.
|
protected |
|
protected |
|
protected |
|
inline |
Initializes the Iterator to use the passed InterpolateableMapIterator.
|
inline |
|
inlinevirtual |
|
inlineoverridevirtual |
Returns the next position a call to "next()" would jump to.
This method has constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Returns the current position of the iterator.
This method has constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Returns the value of the function at the current position.
This method has constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Returns true if the iterator has a next value inside its range a call to "next()" can jump to.
Constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Returns true if the current position of the iterator is in range of the function.
This method should be used as end-condition when iterating over the function with the "next()" method.
THis method has constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Iterates to the specified position.
This method should be used if the new position is near the current position.
The passed position should compared bigger than the current position.
This method has linear complexity over the number of key-entries between the current position and the passed position. So if the passed position is near the current position the complexity is nearly constant.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Lets the iterator point to the passed position.
The passed new position can be at arbitrary places.
This method has logarithmic complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Lets the iterator point to the begin of the mapping.
The beginning of the mapping is the smallest key entry in the InterpolateableMap.
Constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Iterates to the next position of the function.
The next position is the next bigger key entry of the InterpoalteableMap.
This method has constant complexity.
Implements inet::physicallayer::ConstMappingIterator.
|
inlineoverridevirtual |
Changes the value of the function at the current position.
This method has constant complexity.
|
inlineprotected |
|
protected |
|
protected |
Stores if this mapping represents a step function.
Assures that the steps are considered when iterating the mapping by adding a second key-entry as short as possible before every key entry set by the user. The additional key-entry defines the value the mapping has just before the key entry the user added.
|
protected |
Stores the next position a call of "next()" would jump to.
|
protected |
Stores the current position of the iterator.
|
protected |
Stores the current position iterator inside the Mapping.