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>
Inherits Mapping.

Public Member Functions | |
| TimeMapping (InterpolationMethod intpl=LINEAR) | |
| Initializes the Mapping with the passed Interpolation method. | |
| TimeMapping (double outOfRangeVal, InterpolationMethod intpl=LINEAR) | |
| Initializes the Mapping with the passed Interpolation method. | |
| virtual Mapping * | clone () const |
| returns a deep copy of this mapping instance. | |
| virtual double | getValue (const Argument &pos) const |
| Returns the value of this Function at the position specified by the passed Argument. | |
| virtual void | setValue (const Argument &pos, double value) |
| Changes the value of the function at the specified position. | |
| virtual MappingIterator * | createIterator () |
| Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to. | |
| virtual MappingIterator * | createIterator (const Argument &pos) |
| Returns a pointer of a new Iterator which is able to iterate over the function and can change the value the iterator points to. | |
Protected Types | |
|
typedef std::map< simtime_t, double > | MapType |
| The type of the std::map used by the InterpolateableMap. | |
|
typedef InterpolateableMap < simtime_t, double, Interpolator< simtime_t, double, MapType::value_type, MapType::const_iterator > > | ValueMap |
| Defines the used InterpolateableMap and its template-parameters. | |
Protected Attributes | |
| ValueMap | entries |
| Stores the key-entries defining the function. | |
| bool | isStepMapping |
| Stores if this mapping represents a step function. | |
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.
Definition at line 276 of file MappingUtils.h.
| virtual MappingIterator* TimeMapping< Interpolator >::createIterator | ( | const Argument & | pos | ) | [inline, virtual] |
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 Mapping.
Definition at line 356 of file MappingUtils.h.
{
return new TimeMappingIterator<Interpolator>(entries.findIntpl(pos.getTime()), isStepMapping);
}
| virtual MappingIterator* TimeMapping< Interpolator >::createIterator | ( | ) | [inline, virtual] |
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 Mapping.
Definition at line 345 of file MappingUtils.h.
Referenced by UWBIRIEEE802154APathlossModel::filterSignal().
{
return new TimeMappingIterator<Interpolator>(entries.beginIntpl(), isStepMapping);
}
| virtual double TimeMapping< Interpolator >::getValue | ( | const Argument & | pos | ) | const [inline, virtual] |
Returns the value of this Function at the position specified by the passed Argument.
This method has logarithmic complexity.
Implements ConstMapping.
Definition at line 324 of file MappingUtils.h.
| virtual void TimeMapping< Interpolator >::setValue | ( | const Argument & | pos, | |
| double | value | |||
| ) | [inline, virtual] |
Changes the value of the function at the specified position.
This method has logarithmic complexity.
Implements Mapping.
Definition at line 334 of file MappingUtils.h.
Referenced by UWBIRStochasticPathlossModel::filterSignal(), PERModel::filterSignal(), IntensityModel::filterSignal(), and BreakpointPathlossModel::filterSignal().
bool TimeMapping< Interpolator >::isStepMapping [protected] |
Stores if this mapping represents a step function.
Assures that the steps are considered when iterating the mapping by adding a second key-entry as short as possible before every key entry set by the user. The additional key-entry defines the value the mapping has just before the key entry the user added.
Definition at line 298 of file MappingUtils.h.
Referenced by TimeMapping< Linear >::createIterator().
1.7.1