unsigned int linearSearchHelper(T &x, const std::vector< Real > &vector) const
linear search helper for a single std::vector; note that argument is non-const to handle smaller/larg...
T multiLinearInterpolation(const std::vector< T > &x) const
This function will take an independent variable input and will return the dependent variable based on...
void linearSearch(std::vector< T > &values, MultiIndex< Real >::size_type &indices) const
linearSearch finds the indices i_k of the base point such that base_point[d][i_k] <= values[d] < base...
MultiDimensionalInterpolationTempl< ADReal > DualMultiDimensionalInterpolation
virtual ~MultiDimensionalInterpolationTempl()=default
void setData(const std::vector< std::vector< Real >> &base_points, const MultiIndex< Real > &data)
sets data but also fixes degenerate dimensions in data
std::vector< std::vector< Real > > _base_points
std::vector< bool > _degenerate_index
this variable keeps track on which dimension is degenerate and was removed
DualMultiDimensionalInterpolation ADMultiDimensionalInterpolation
unsigned int dim() const
returns the dimensionality of this interpolation object
unsigned int _original_dim
original dimension is to allow checks on user inputs for cases where arrays are sliced ...
This class interpolates multi-dimensional data sets.
MultiDimensionalInterpolationTempl< Real > MultiDimensionalInterpolation
bool _degenerate_interpolation
if all dimensions have size one then there is only one value to return this corner case should be sup...
MultiDimensionalInterpolationTempl()
void errorCheck()
checks consistency of the data