INET Framework for OMNeT++/OMNEST
|
Helper class which represents a linear interpolation between two other mappings. More...
#include <MappingUtils.h>
Public Member Functions | |
LinearIntplMapping (const LinearIntplMapping &o) | |
LinearIntplMapping & | operator= (const LinearIntplMapping ©) |
void | swap (LinearIntplMapping &s) |
LinearIntplMapping (const ConstMapping *const left=nullptr, const ConstMapping *const right=nullptr, argument_value_cref_t f=Argument::MappedZero) | |
Initializes the LinearIntplMapping with the passed left and right Mapping to interpolate by the passed interpolation value. More... | |
virtual | ~LinearIntplMapping () |
virtual Mapping * | clone () const override |
Interpolated mappings are not supposed to be cloned! More... | |
virtual argument_value_t | getValue (const Argument &pos) const override |
Returns the linear interpolated value of this Mapping. More... | |
virtual MappingIterator * | createIterator () override |
An interpolated mapping doesn't have a valid "first"-entry, so this method is not supported. More... | |
virtual MappingIterator * | createIterator (const Argument &pos) override |
Creates an iterator for this mapping starting at the passed position. More... | |
virtual void | setValue (const Argument &, argument_value_cref_t) override |
This method is not supported! More... | |
Public Member Functions inherited from inet::physicallayer::Mapping | |
Mapping & | operator= (const Mapping ©) |
Mapping assignment operator. More... | |
void | swap (Mapping &s) |
Swaps data with another Mapping. More... | |
Mapping (const DimensionSet &dims) | |
Initializes the Mapping with the passed DimensionSet as domain. More... | |
Mapping () | |
Initializes the Mapping with the time dimension as domain. More... | |
Mapping (const Mapping &o) | |
virtual | ~Mapping () |
virtual void | appendValue (const Argument &pos, argument_value_cref_t value) |
Appends the passed value at the passed position to the mapping. More... | |
virtual ConstMappingIterator * | createConstIterator () const override |
Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method. More... | |
virtual ConstMappingIterator * | createConstIterator (const Argument &pos) const override |
Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method. More... | |
virtual ConstMapping * | constClone () const override |
Returns a deep const copy of this mapping by using the according "clone()"-implementation. More... | |
Public Member Functions inherited from inet::physicallayer::ConstMapping | |
ConstMapping & | operator= (const ConstMapping ©) |
ConstMapping assignment operator. More... | |
void | swap (ConstMapping &s) |
Swaps data with another ConstMapping. More... | |
ConstMapping () | |
Initializes the ConstMapping with a the time dimension as domain. More... | |
ConstMapping (const ConstMapping &o) | |
ConstMapping (const DimensionSet &dimSet) | |
Initializes the ConstMapping with the passed DimensionSet as Domain. More... | |
virtual | ~ConstMapping () |
argument_value_t | operator[] (const Argument &pos) const |
Returns the value of this Mapping at the position specified by the passed Argument. More... | |
const DimensionSet & | getDimensionSet () const |
Returns this Mappings domain as DimensionSet. More... | |
template<class stream > | |
stream & | print (stream &out, argument_value_cref_t lTimeScale=argument_value_t(1), argument_value_cref_t lLeftColScale=Argument::MappedOne, const std::string &sTableHead=std::string("o\\ms"), const Dimension *const pOnlyDim=nullptr) const |
Prints the Mapping to an output stream. More... | |
Protected Attributes | |
const ConstMapping * | left |
The left mapping to interpolate. More... | |
const ConstMapping * | right |
The right mapping to interpolate. More... | |
argument_value_t | factor |
The interpolation factor determining the linear interpolation between left and right mapping. More... | |
Protected Attributes inherited from inet::physicallayer::ConstMapping | |
DimensionSet | dimensions |
The dimensions of this mappings domain. More... | |
Additional Inherited Members | |
Public Types inherited from inet::physicallayer::Mapping | |
enum | InterpolationMethod { STEPS, NEAREST, LINEAR } |
Types of interpolation methods for mappings. More... | |
Public Types inherited from inet::physicallayer::ConstMapping | |
typedef Argument::mapped_type | argument_value_t |
typedef Argument::mapped_type_cref | argument_value_cref_t |
Helper class which represents a linear interpolation between two other mappings.
|
inline |
|
inline |
Initializes the LinearIntplMapping with the passed left and right Mapping to interpolate by the passed interpolation value.
|
inlineoverridevirtual |
Interpolated mappings are not supposed to be cloned!
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
An interpolated mapping doesn't have a valid "first"-entry, so this method is not supported.
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
Creates an iterator for this mapping starting at the passed position.
Note: The returned Iterator does only support a subset of the normal MappingIterator-methods. See LinearIntplMappingIterator for details.
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
Returns the linear interpolated value of this Mapping.
The value is calculated by the following formula:
v = left + (right - left) * intplFactor
Implements inet::physicallayer::ConstMapping.
|
inline |
|
inlineoverridevirtual |
|
inline |
|
protected |
The interpolation factor determining the linear interpolation between left and right mapping.
Referenced by swap().
|
protected |
The left mapping to interpolate.
Referenced by swap().
|
protected |
The right mapping to interpolate.
Referenced by swap().