Variadic template Data
struct¶
-
template<typename Func, int Dim>
struct Data¶ Struct for interpolation data.
The Data struct is a simple wrapper of the std::array that allows you to have arrays of arrays. The idea is that for example for cubic interpolation, you need in 1D 4 data points, in 2D 4x4 data points etc. In 1D this array contains the necessary points for a given x. In 2D This array contains arrays for a given constant y whose interpolation results can then again be used for constant x, etc.
- Template Parameters:
Func – The interpolation function for which to use the data. This determines how many data points are needed. E.g. cubic interpolation requires 4 points. The function must provide the value NUMBER_OF_VALUES.
Dim – The dimensionality of the data to interpolate. E.g. for 2 dimensional data, the result would be an array of arrays.
Public Functions
-
template<typename ...Indices>
inline Func::VALUE_TYPE operator()(size_t index_0, Indices... indices) const¶ function to access this n-dimensional data
- Parameters:
index_0 – [in] the first index of the n-dimensional position for which to look up the value
indices – [in] further indices depending on dimensionality, i.e. Dim-1 indices for Dim-dimensional data.
- Returns:
The value in the Dim-dimensional data structure at the given position
-
template<typename ...Indices>
inline Func::VALUE_TYPE &operator()(size_t index_0, Indices... indices)¶ function to access this n-dimensional data
- Parameters:
index_0 – [in] the first index of the n-dimensional position for which to look up the value
indices – [in] further indices depending on dimensionality, i.e. Dim-1 indices for Dim-dimensional data.
- Returns:
A reference to the value in the Dim-dimensional data structure at the given position
Warning
doxygenstruct: Cannot find class “interpolation::Data<Func, 1>” in doxygen xml output for project “affine_transform” from directory: cpp/xml/