Eclipse SUMO - Simulation of Urban MObility
|
A generic class to operate on LinearApproxMap instances. More...
#include <LinearApproxHelpers.h>
Public Types | |
typedef std::map< double, double > | LinearApproxMap |
Static Public Member Functions | |
static double | getInterpolatedValue (const LinearApproxMap &map, double axisValue) |
Get interpolated value. | |
static double | getMaximumValue (const LinearApproxMap &map) |
Get the largest height value. | |
static double | getMinimumValue (const LinearApproxMap &map) |
Get the smallest height value. | |
static std::vector< double > | getValueTable (const std::string &dataString) |
split string into data values | |
static void | scalePoints (LinearApproxMap &map, double keyFactor, double valueFactor) |
Scale both key and values. | |
static void | scaleValues (LinearApproxMap &map, const double factor) |
Scale values. | |
static bool | setPoints (LinearApproxMap &map, const std::string &axisString, const std::string &heightString) |
Set data points. | |
static void | setValues (LinearApproxMap &map, const std::string &heightString) |
Set height values for existing axis values. | |
A generic class to operate on LinearApproxMap instances.
Definition at line 34 of file LinearApproxHelpers.h.
typedef std::map<double, double> LinearApproxHelpers::LinearApproxMap |
Definition at line 36 of file LinearApproxHelpers.h.
|
static |
Get interpolated value.
[in] | axisValue | axis value to get the interpolated data point for |
Definition at line 62 of file LinearApproxHelpers.cpp.
Referenced by MSDevice_Battery::getMaximumChargeRate(), MSCFModel_Rail::TrainParams::getResistance(), and MSCFModel_Rail::TrainParams::getTraction().
|
static |
Get the largest height value.
Definition at line 47 of file LinearApproxHelpers.cpp.
References TL.
Referenced by MSDevice_Battery::MSDevice_Battery().
|
static |
Get the smallest height value.
Definition at line 32 of file LinearApproxHelpers.cpp.
References TL.
|
static |
split string into data values
[in] | dataString | string containing row of double values |
Definition at line 84 of file LinearApproxHelpers.cpp.
References StringTokenizer::getVector(), and StringUtils::toDouble().
Referenced by setPoints(), and setValues().
|
static |
Scale both key and values.
[in] | keyFactor | to scale the key with |
[in] | valueFactor | to scale the value with |
Definition at line 113 of file LinearApproxHelpers.cpp.
Referenced by MSCFModel_Rail::initFreightResistance(), MSCFModel_Rail::initFreightTraction(), MSCFModel_Rail::initICE1Resistance(), MSCFModel_Rail::initICE1Traction(), MSCFModel_Rail::initICE3Resistance(), MSCFModel_Rail::initICE3Traction(), MSCFModel_Rail::initMireoPlusB2TResistance(), MSCFModel_Rail::initMireoPlusB2TTraction(), MSCFModel_Rail::initMireoPlusH2TResistance(), MSCFModel_Rail::initMireoPlusH2TTraction(), MSCFModel_Rail::initNGT400_16Resistance(), MSCFModel_Rail::initNGT400_16Traction(), MSCFModel_Rail::initNGT400Resistance(), MSCFModel_Rail::initNGT400Traction(), MSCFModel_Rail::initRB425Resistance(), MSCFModel_Rail::initRB425Traction(), MSCFModel_Rail::initRB628Resistance(), MSCFModel_Rail::initRB628Traction(), MSCFModel_Rail::initREDosto7Resistance(), and MSCFModel_Rail::initREDosto7Traction().
|
static |
Scale values.
[in] | factor | with which to scale the values |
Definition at line 123 of file LinearApproxHelpers.cpp.
|
static |
Set data points.
[in] | axisString | string of axis points |
[in] | heightString | string of height data |
Definition at line 96 of file LinearApproxHelpers.cpp.
References getValueTable(), and TLF.
Referenced by MSDevice_Battery::MSDevice_Battery().
|
static |
Set height values for existing axis values.
[in] | heightString | string of height data |
Definition at line 130 of file LinearApproxHelpers.cpp.
References getValueTable(), and TLF.