Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
LinearApproxHelpers Class Reference

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.
 

Detailed Description

A generic class to operate on LinearApproxMap instances.

Definition at line 34 of file LinearApproxHelpers.h.

Member Typedef Documentation

◆ LinearApproxMap

typedef std::map<double, double> LinearApproxHelpers::LinearApproxMap

Definition at line 36 of file LinearApproxHelpers.h.

Member Function Documentation

◆ getInterpolatedValue()

double LinearApproxHelpers::getInterpolatedValue ( const LinearApproxMap map,
double  axisValue 
)
static

Get interpolated value.

Parameters
[in]axisValueaxis 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().

Here is the caller graph for this function:

◆ getMaximumValue()

double LinearApproxHelpers::getMaximumValue ( const LinearApproxMap map)
static

Get the largest height value.

Returns
Maximum height value

Definition at line 47 of file LinearApproxHelpers.cpp.

References TL.

Referenced by MSDevice_Battery::MSDevice_Battery().

Here is the caller graph for this function:

◆ getMinimumValue()

double LinearApproxHelpers::getMinimumValue ( const LinearApproxMap map)
static

Get the smallest height value.

Returns
Minimum height value

Definition at line 32 of file LinearApproxHelpers.cpp.

References TL.

◆ getValueTable()

std::vector< double > LinearApproxHelpers::getValueTable ( const std::string &  dataString)
static

split string into data values

Parameters
[in]dataStringstring containing row of double values

Definition at line 84 of file LinearApproxHelpers.cpp.

References StringTokenizer::getVector(), and StringUtils::toDouble().

Referenced by setPoints(), and setValues().

Here is the caller graph for this function:

◆ scalePoints()

◆ scaleValues()

void LinearApproxHelpers::scaleValues ( LinearApproxMap map,
const double  factor 
)
static

Scale values.

Parameters
[in]factorwith which to scale the values

Definition at line 123 of file LinearApproxHelpers.cpp.

◆ setPoints()

bool LinearApproxHelpers::setPoints ( LinearApproxMap map,
const std::string &  axisString,
const std::string &  heightString 
)
static

Set data points.

Parameters
[in]axisStringstring of axis points
[in]heightStringstring of height data

Definition at line 96 of file LinearApproxHelpers.cpp.

References getValueTable(), and TLF.

Referenced by MSDevice_Battery::MSDevice_Battery().

Here is the caller graph for this function:

◆ setValues()

void LinearApproxHelpers::setValues ( LinearApproxMap map,
const std::string &  heightString 
)
static

Set height values for existing axis values.

Parameters
[in]heightStringstring of height data

Definition at line 130 of file LinearApproxHelpers.cpp.

References getValueTable(), and TLF.


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