INET Framework for OMNeT++/OMNEST
|
Takes a source ConstMapping with a domain A and a set of KeyEntries for a domain B and creates a clone of the source mapping with the domain B and the KeyEntries passed. More...
#include <MappingUtils.h>
Public Types | |
typedef std::set< argument_value_t > | KeySet |
typedef std::map< Dimension, KeySet > | KeyMap |
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 |
Public Member Functions | |
FilledUpMapping (const ConstMapping *source, const DimensionSet &dims, const KeyMap &rkeys) | |
virtual | ~FilledUpMapping () |
virtual void | appendValue (const Argument &pos, argument_value_cref_t value) override |
virtual MappingIterator * | createIterator () override |
Returns a pointer of a new Iterator which is able to iterate over the Mapping 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 Mapping and can change the value the iterator points to. More... | |
Public Member Functions inherited from inet::physicallayer::MultiDimMapping< Linear > | |
MultiDimMapping (const DimensionSet &myDims) | |
Initializes the Mapping with the passed DimensionSet as domain. More... | |
MultiDimMapping (const DimensionSet &myDims, argument_value_cref_t oorv) | |
Initializes the Mapping with the passed DimensionSet as domain. More... | |
MultiDimMapping (const MultiDimMapping< Linear > &o) | |
Copy-constructor which assures that the sub-mappings are deep copied instead of only their the pointers. More... | |
const MultiDimMapping & | operator= (const MultiDimMapping< Linear > &o) |
Copy operator which assures that the sub-mappings are deep copied instead of only their the pointers. More... | |
virtual Mapping * | clone () const override |
returns a deep copy of this mapping instance. More... | |
virtual | ~MultiDimMapping () |
Frees the memory for the sub mappings. More... | |
virtual argument_value_t | getValue (const Argument &pos) const override |
Returns the value of this Mapping at position specified by the passed Argument. More... | |
virtual void | setValue (const Argument &pos, argument_value_cref_t value) override |
Changes the value of the Mapping at the specified position. More... | |
Dimension | getDimension () |
Returns the dimension this instance represents. 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 Member Functions | |
void | fillRefIfNecessary () |
FilledUpMapping (const DimensionSet &myDims, Dimension myDim, const KeyMap &rkeys) | |
Mapping * | createSubSignal () const |
Protected Member Functions inherited from inet::physicallayer::MultiDimMapping< Linear > | |
MultiDimMapping (const DimensionSet &myDims, Dimension myDim) | |
Initializes the Mapping with the passed DimensionSet as domain and the passed dimension as the dimension this instance should represent. More... | |
MultiDimMapping (const DimensionSet &myDims, Dimension myDim, ConstantSimpleConstMapping *oorm, ConstMappingWrapper *wrappedoorm) | |
Initializes the Mapping with the passed DimensionSet as domain and the passed dimension as the dimension this instance should represent. More... | |
MultiDimMapping (const MultiDimMapping< Linear > &o, ConstantSimpleConstMapping *oorm, ConstMappingWrapper *wrappedoorm) | |
Intern copy-constructor which assures that the sub-mappings are deep copied instead of only their pointers. More... | |
mapped_type | createSubSignal () const |
Internal helper method which creates a new sub-mapping for this MultiDimMapping instance. More... | |
void | copySubMappings () |
Protected Attributes | |
Mapping * | fillRef |
const KeyMap & | keys |
Protected Attributes inherited from inet::physicallayer::MultiDimMapping< Linear > | |
ConstantSimpleConstMapping * | outOfRangeMapping |
Returned by the Interpolator if the mapping is accessed outside its range (before or after the last key entry in a dimension). More... | |
ConstMappingWrapper * | wrappedOORMapping |
Wraps the out of range mapping which is an instance of ConstMapping inside an instance of Mapping which setValue method is asserted to never be called. More... | |
interpolator_map_type | entries |
Stores the sub-mappings for the dimension this instance represents. More... | |
Dimension | myDimension |
The dimension this instance represents. More... | |
bool | isMaster |
Protected Attributes inherited from inet::physicallayer::ConstMapping | |
DimensionSet | dimensions |
The dimensions of this mappings domain. More... | |
Private Member Functions | |
FilledUpMapping (const FilledUpMapping &) | |
Copy constructor is not allowed. More... | |
FilledUpMapping & | operator= (const FilledUpMapping &) |
Assignment operator is not allowed. More... | |
Additional Inherited Members | |
Protected Types inherited from inet::physicallayer::MultiDimMapping< Linear > | |
typedef InterpolateableMap< Linear< std::map< argument_value_t, Mapping * > > > | 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 |
Takes a source ConstMapping with a domain A and a set of KeyEntries for a domain B and creates a clone of the source mapping with the domain B and the KeyEntries passed.
This class is used by "applyElementWiseOperator()"-method to be able to handle cases where the second mappings domain is a real subset of the first mappings domain (meaning the first mappings domain has the same dimensions as the seconds domain and at least one further dimension).
typedef std::map<Dimension, KeySet> inet::physicallayer::FilledUpMapping::KeyMap |
typedef std::set<argument_value_t> inet::physicallayer::FilledUpMapping::KeySet |
|
private |
Copy constructor is not allowed.
|
inlineprotected |
|
inline |
|
inlinevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change the value the iterator points to.
The caller of this method has to delete the Iterator if not needed anymore.
Reimplemented from inet::physicallayer::MultiDimMapping< Linear >.
|
inlineoverridevirtual |
Returns a pointer of a new Iterator which is able to iterate over the Mapping and can change the value the iterator points to.
The caller of this method has to delete the Iterator if not needed anymore.
Reimplemented from inet::physicallayer::MultiDimMapping< Linear >.
|
inlineprotected |
|
inlineprotected |
|
private |
Assignment operator is not allowed.
|
protected |
|
protected |