INET Framework for OMNeT++/OMNEST
|
Implements the Mapping-interface with an InterpolateableMap from simtime_t to double between which values can be interpolated to represent a Mapping with only time as domain. More...
#include <MappingUtils.h>
Public Member Functions | |
TimeMapping () | |
Initializes the Mapping with the passed Interpolation method. More... | |
TimeMapping (const TimeMapping< Interpolator > &o) | |
TimeMapping (mapped_cref_type outOfRangeVal) | |
Initializes the Mapping with the passed Interpolation method. More... | |
virtual | ~TimeMapping () |
virtual Mapping * | clone () const override |
returns a deep copy of this mapping instance. More... | |
virtual argument_value_t | getValue (const Argument &pos) const override |
Returns the value of this Function at the position specified by the passed Argument. More... | |
virtual void | setValue (const Argument &pos, argument_value_cref_t value) override |
Changes the value of the function at the specified position. More... | |
virtual MappingIterator * | createIterator () override |
Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to. More... | |
virtual MappingIterator * | createIterator (const Argument &pos) override |
Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to. 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 | 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 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 Types | |
typedef InterpolateableMap< Interpolator< std::map< simtime_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::mapped_cref_type | mapped_cref_type |
typedef interpolator_map_type::iterator_intpl | iterator |
typedef interpolator_map_type::const_iterator_intpl | const_iterator |
Protected Attributes | |
interpolator_map_type | entries |
Stores the key-entries defining the function. 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 |
Implements the Mapping-interface with an InterpolateableMap from simtime_t to double between which values can be interpolated to represent a Mapping with only time as domain.
|
protected |
|
protected |
The templated InterpolateableMap the underlying Mapping uses std::map as storage type.
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
Initializes the Mapping with the passed Interpolation method.
|
inline |
|
inline |
Initializes the Mapping with the passed Interpolation method.
|
inlinevirtual |
|
inlineoverridevirtual |
returns a deep copy of this mapping instance.
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to.
Note: The caller of this method has to delete the returned Iterator pointer if it isn't used anymore.
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to.
Note: The caller of this method has to delete the returned Iterator pointer if it isn't used anymore.
Implements inet::physicallayer::Mapping.
|
inlineoverridevirtual |
Returns the value of this Function at the position specified by the passed Argument.
This method has logarithmic complexity.
Implements inet::physicallayer::ConstMapping.
|
inlineoverridevirtual |
Changes the value of the function at the specified position.
This method has logarithmic complexity.
|
protected |
Stores the key-entries defining the function.