|
template<int TMult, int TDiv> |
void | initValues (scaled_channel< TValue, TMult, TDiv >(&table)[TRowNum][TColNum]) |
|
void | initValues (TValue(&table)[TRowNum][TColNum]) |
|
template<int TRowMult, int TRowDiv> |
void | initRows (const scaled_channel< TRow, TRowMult, TRowDiv >(&rowBins)[TRowNum]) |
|
void | initRows (const TRow(&rowBins)[TRowNum]) |
|
template<int TColMult, int TColDiv> |
void | initCols (const scaled_channel< TXColumn, TColMult, TColDiv >(&columnBins)[TColNum]) |
|
void | initCols (const TXColumn(&columnBins)[TColNum]) |
|
TValue | getValueAtPosition (size_t row, size_t column) const |
|
template<int TColNum, int TRowNum, typename TValue, typename TXColumn, typename TRow>
class Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >
this helper class brings together 3D table with two 2D axis curves TODO: explicitly spell out why do we have this template and when exactly is it useful (useful with scaled content?) todo: improve interpolate3d to handle scaling? A recommended use is if a class depends on a table and this can be shared with several classes but only one is instantiated, see for example airmass.h It can also be used if you need to test the behavior of a calculated X/Y => table value, but it is advisable to do those expects externally and/or only test the result of the get, since interpotalate3d is easier to use and does not require initiation. *** WARNING *** https://en.wikipedia.org/wiki/KISS_principle *** WARNING *** this helper requires initialization, make sure that helper is useful any time you consider using it *** WARNING *** we had too many bugs where we were not initializing, often just using the underlying interpolate3d is the way to go
Definition at line 43 of file table_helper.h.
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
template<int TColMult, int TColDiv>
void Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initCols |
( |
const scaled_channel< TXColumn, TColMult, TColDiv >(&) |
columnBins[TColNum] | ) |
|
|
inlineprivate |
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
template<int TRowMult, int TRowDiv>
void Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initRows |
( |
const scaled_channel< TRow, TRowMult, TRowDiv >(&) |
rowBins[TRowNum] | ) |
|
|
inlineprivate |
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
template<typename TValueInit , typename TXColumnInit , typename TRowInit >
void Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initTable |
( |
TValueInit(&) |
table[TRowNum][TColNum], |
|
|
const TXColumnInit(&) |
columnBins[TColNum], |
|
|
const TRowInit(&) |
rowBins[TRowNum] |
|
) |
| |
|
inline |
Definition at line 49 of file table_helper.h.
50 {
51
52
56 }
void initCols(const scaled_channel< TXColumn, TColMult, TColDiv >(&columnBins)[TColNum])
void initValues(scaled_channel< TValue, TMult, TDiv >(&table)[TRowNum][TColNum])
void initRows(const scaled_channel< TRow, TRowMult, TRowDiv >(&rowBins)[TRowNum])
Referenced by initElectronicThrottle(), initFuelMap(), initGpPwm(), initScriptImpl(), initSpeedDensity(), and initVvtActuators().
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
template<int TMult, int TDiv>
void Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initValues |
( |
scaled_channel< TValue, TMult, TDiv >(&) |
table[TRowNum][TColNum] | ) |
|
|
inlineprivate |
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
const TXColumn(* Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::m_columnBins)[TColNum] = nullptr |
|
private |
Definition at line 131 of file table_helper.h.
Referenced by Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::getValue(), Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initCols(), and Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initCols().
template<int TColNum, int TRowNum, typename TValue , typename TXColumn , typename TRow >
TValue(* Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::m_values)[TRowNum][TColNum] = nullptr |
|
private |
Definition at line 128 of file table_helper.h.
Referenced by Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::getValue(), Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::getValueAtPosition(), Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initValues(), Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::initValues(), and Map3D< TColNum, TRowNum, TValue, TXColumn, TRow >::setAll().