INET Framework for OMNeT++/OMNEST
inet::physicallayer::FrequencyMapping< Interpolator > Class Template Reference

Implements the Mapping-interface with an InterpolateableMap from double to double between which values can be interpolated to represent a Mapping with only frequency as domain. More...

#include <MappingUtils.h>

Inheritance diagram for inet::physicallayer::FrequencyMapping< Interpolator >:
inet::physicallayer::Mapping inet::physicallayer::ConstMapping

Public Member Functions

 FrequencyMapping ()
 Initializes the Mapping with the passed Interpolation method. More...
 
 FrequencyMapping (const FrequencyMapping< Interpolator > &o)
 
 FrequencyMapping (mapped_cref_type outOfRangeVal)
 Initializes the Mapping with the passed Interpolation method. More...
 
virtual ~FrequencyMapping ()
 
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 &copy)
 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 &copy)
 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< 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::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
 

Detailed Description

template<template< typename > class Interpolator>
class inet::physicallayer::FrequencyMapping< Interpolator >

Implements the Mapping-interface with an InterpolateableMap from double to double between which values can be interpolated to represent a Mapping with only frequency as domain.

Author
Karl Wessel

Member Typedef Documentation

template<template< typename > class Interpolator>
typedef interpolator_map_type::const_iterator_intpl inet::physicallayer::FrequencyMapping< Interpolator >::const_iterator
protected
template<template< typename > class Interpolator>
typedef InterpolateableMap<Interpolator<std::map<argument_value_t, argument_value_t> > > inet::physicallayer::FrequencyMapping< Interpolator >::interpolator_map_type
protected

The templated InterpolateableMap the underlying Mapping uses std::map as storage type.

template<template< typename > class Interpolator>
typedef interpolator_map_type::interpolator_type inet::physicallayer::FrequencyMapping< Interpolator >::interpolator_type
protected
template<template< typename > class Interpolator>
typedef interpolator_map_type::iterator_intpl inet::physicallayer::FrequencyMapping< Interpolator >::iterator
protected
template<template< typename > class Interpolator>
typedef interpolator_map_type::mapped_cref_type inet::physicallayer::FrequencyMapping< Interpolator >::mapped_cref_type
protected
template<template< typename > class Interpolator>
typedef interpolator_map_type::mapped_type inet::physicallayer::FrequencyMapping< Interpolator >::mapped_type
protected

Constructor & Destructor Documentation

template<template< typename > class Interpolator>
inet::physicallayer::FrequencyMapping< Interpolator >::FrequencyMapping ( )
inline

Initializes the Mapping with the passed Interpolation method.

685  :
Mapping()
Initializes the Mapping with the time dimension as domain.
Definition: MappingBase.h:1299
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
static const DimensionSet freqDomain
Shortcut to a DimensionSet which only contains frequency.
Definition: MappingBase.h:161
template<template< typename > class Interpolator>
inet::physicallayer::FrequencyMapping< Interpolator >::FrequencyMapping ( const FrequencyMapping< Interpolator > &  o)
inline
687  :
688  Mapping(o), entries(o.entries) {}
Mapping()
Initializes the Mapping with the time dimension as domain.
Definition: MappingBase.h:1299
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
template<template< typename > class Interpolator>
inet::physicallayer::FrequencyMapping< Interpolator >::FrequencyMapping ( mapped_cref_type  outOfRangeVal)
inline

Initializes the Mapping with the passed Interpolation method.

693  :
694  Mapping(DimensionSet::freqDomain), entries(outOfRangeVal) {}
Mapping()
Initializes the Mapping with the time dimension as domain.
Definition: MappingBase.h:1299
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
static const DimensionSet freqDomain
Shortcut to a DimensionSet which only contains frequency.
Definition: MappingBase.h:161
template<template< typename > class Interpolator>
virtual inet::physicallayer::FrequencyMapping< Interpolator >::~FrequencyMapping ( )
inlinevirtual
696 {}

Member Function Documentation

template<template< typename > class Interpolator>
virtual Mapping* inet::physicallayer::FrequencyMapping< Interpolator >::clone ( ) const
inlineoverridevirtual

returns a deep copy of this mapping instance.

Implements inet::physicallayer::Mapping.

700 { return new FrequencyMapping<Interpolator>(*this); }
template<template< typename > class Interpolator>
virtual MappingIterator* inet::physicallayer::FrequencyMapping< Interpolator >::createIterator ( )
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.

732  {
733  return new FrequencyMappingIterator<Interpolator>(entries.beginIntpl());
734  }
const_iterator_intpl beginIntpl() const
Definition: Interpolation.h:901
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
template<template< typename > class Interpolator>
virtual MappingIterator* inet::physicallayer::FrequencyMapping< Interpolator >::createIterator ( const Argument &  pos)
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.

744  {
745  return new FrequencyMappingIterator<Interpolator>(entries.findIntpl(pos.getArgValue(Dimension::frequency)));
746  }
static const Dimension frequency
Shortcut to the frequency Dimension, same as &#39;Dimension("frequency")&#39;, but spares the parsing of a st...
Definition: MappingBase.h:68
const_iterator_intpl findIntpl(key_cref_type pos) const
Definition: Interpolation.h:892
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
template<template< typename > class Interpolator>
virtual argument_value_t inet::physicallayer::FrequencyMapping< Interpolator >::getValue ( const Argument &  pos) const
inlineoverridevirtual

Returns the value of this Function at the position specified by the passed Argument.

This method has logarithmic complexity.

Implements inet::physicallayer::ConstMapping.

709  {
710  return *entries.getIntplValue(pos.getArgValue(Dimension::frequency));
711  }
static const Dimension frequency
Shortcut to the frequency Dimension, same as &#39;Dimension("frequency")&#39;, but spares the parsing of a st...
Definition: MappingBase.h:68
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678
interpolated getIntplValue(key_cref_type pos) const
Definition: Interpolation.h:887
template<template< typename > class Interpolator>
virtual void inet::physicallayer::FrequencyMapping< Interpolator >::setValue ( const Argument &  pos,
argument_value_cref_t  value 
)
inlineoverridevirtual

Changes the value of the function at the specified position.

This method has logarithmic complexity.

720  {
721  entries[pos.getArgValue(Dimension::frequency)] = value;
722  }
static const Dimension frequency
Shortcut to the frequency Dimension, same as &#39;Dimension("frequency")&#39;, but spares the parsing of a st...
Definition: MappingBase.h:68
interpolator_map_type entries
Stores the key-entries defining the function.
Definition: MappingUtils.h:678

Member Data Documentation

template<template< typename > class Interpolator>
interpolator_map_type inet::physicallayer::FrequencyMapping< Interpolator >::entries
protected

Stores the key-entries defining the function.


The documentation for this class was generated from the following file: