INET Framework for OMNeT++/OMNEST
|
Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type. More...
#include <MappingBase.h>
Public Types | |
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 |
Public Member Functions | |
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 | setValue (const Argument &pos, argument_value_cref_t value)=0 |
Changes the value of the Mapping at the specified position. More... | |
virtual void | appendValue (const Argument &pos, argument_value_cref_t value) |
Appends the passed value at the passed position to the mapping. More... | |
virtual MappingIterator * | createIterator ()=0 |
Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change it. More... | |
virtual MappingIterator * | createIterator (const Argument &pos)=0 |
Returns a pointer of a new Iterator which is able to iterate over the function and can change it. 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 Mapping * | clone () const =0 |
Returns a deep copy of this Mapping. 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 () |
virtual argument_value_t | getValue (const Argument &pos) const =0 |
Returns the value of this Mapping at the position specified by the passed Argument. More... | |
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... | |
Additional Inherited Members | |
Protected Attributes inherited from inet::physicallayer::ConstMapping | |
DimensionSet | dimensions |
The dimensions of this mappings domain. More... | |
Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.
This class extends the ConstMapping interface with write access.
See ConstMapping for details.
Types of interpolation methods for mappings.
|
inline |
Initializes the Mapping with the passed DimensionSet as domain.
The passed DimensionSet has to contain the time dimension!
|
inline |
Initializes the Mapping with the time dimension as domain.
|
inline |
|
inlinevirtual |
Appends the passed value at the passed position to the mapping.
This method assumes that the passed position is after the last key entry of the mapping.
Depending on the implementation of the underlying method this method could be faster or at least as fast as the "setValue()"-method.
Implementations of the Mapping interface can override this method if appending values to the end of the mapping could be implemented faster than the "setValue()" method. Otherwise this method just calls the "setValue()"-method implementation.
Referenced by inet::physicallayer::FilledUpMapping::appendValue().
|
pure virtual |
Returns a deep copy of this Mapping.
Implemented in inet::physicallayer::DelayedMapping, inet::physicallayer::MultiDimMapping< Interpolator >, inet::physicallayer::MultiDimMapping< Linear >, inet::physicallayer::ConstMappingWrapper, inet::physicallayer::LinearIntplMapping, inet::physicallayer::FrequencyMapping< Interpolator >, and inet::physicallayer::TimeMapping< Interpolator >.
|
inlineoverridevirtual |
Returns a deep const copy of this mapping by using the according "clone()"-implementation.
Implements inet::physicallayer::ConstMapping.
Reimplemented in inet::physicallayer::ConstMappingWrapper.
|
inlineoverridevirtual |
Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method.
Override this method if your ConstIterator differs from the normal iterator.
Implements inet::physicallayer::ConstMapping.
Reimplemented in inet::physicallayer::BaseDelayedMapping< Mapping >, and inet::physicallayer::ConstMappingWrapper.
|
inlineoverridevirtual |
Returns an ConstMappingIterator by use of the respective implementation of the "createIterator()"-method.
Override this method if your ConstIterator differs from the normal iterator.
Implements inet::physicallayer::ConstMapping.
Reimplemented in inet::physicallayer::BaseDelayedMapping< Mapping >, and inet::physicallayer::ConstMappingWrapper.
|
pure virtual |
Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change it.
Implemented in inet::physicallayer::DelayedMapping, inet::physicallayer::FilledUpMapping, inet::physicallayer::MultiDimMapping< Interpolator >, inet::physicallayer::MultiDimMapping< Linear >, inet::physicallayer::ConstMappingWrapper, inet::physicallayer::LinearIntplMapping, inet::physicallayer::FrequencyMapping< Interpolator >, and inet::physicallayer::TimeMapping< Interpolator >.
Referenced by inet::physicallayer::MappingUtils::applyElementWiseOperator().
|
pure virtual |
Returns a pointer of a new Iterator which is able to iterate over the function and can change it.
The iterator starts at the passed position.
Implemented in inet::physicallayer::DelayedMapping, inet::physicallayer::FilledUpMapping, inet::physicallayer::MultiDimMapping< Interpolator >, inet::physicallayer::MultiDimMapping< Linear >, inet::physicallayer::ConstMappingWrapper, inet::physicallayer::LinearIntplMapping, inet::physicallayer::FrequencyMapping< Interpolator >, and inet::physicallayer::TimeMapping< Interpolator >.
Mapping assignment operator.
copy | A Mapping of identical element and allocator types. |
All the elements of copy are copied.
|
pure virtual |
Changes the value of the Mapping at the specified position.
The complexity of this method depends on the implementation.
Implemented in inet::physicallayer::DelayedMapping, inet::physicallayer::ConstMappingWrapper, and inet::physicallayer::LinearIntplMapping.
Referenced by inet::physicallayer::MappingUtils::addDiscontinuity(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::DimensionalTransmitterBase::createPowerMapping(), and inet::physicallayer::Ieee802154UWBIRTransmitter::generatePulse().
|
inline |
Swaps data with another Mapping.
s | A Mapping of the same element and allocator types. |
This exchanges the elements between two DimensionSet's in constant time. Note that the global std::swap() function is specialized such that std::swap(s1,s2) will feed to this function.
Referenced by inet::physicallayer::LinearIntplMapping::swap().