Alexandria 2.31.2
SDC-CH common library for the Euclid project
|
Public Member Functions | |
InterpN (const std::tuple< std::vector< T >, std::vector< Rest >... > &grid, const NdArray::NdArray< double > &values, bool extrapolate) | |
double | operator() (T x, Rest... rest) const |
InterpN (const InterpN &other) | |
Copy constructor. | |
InterpN (const std::tuple< std::vector< AxisType >... > &grid, const NdArray::NdArray< double > &values, bool extrapolate) | |
~InterpN ()=default | |
double | operator() (AxisType... args) const |
Private Attributes | |
std::vector< T > | m_knots |
std::vector< std::unique_ptr< InterpN< Rest... > > > | m_interpolators |
bool | m_extrapolate |
Recursive specialization of an N-Dimensional interpolator
N | Dimensionality (N > 1) |
F | The first element of the index sequence |
Rest | The rest of the elements from the index sequence |
Definition at line 172 of file GridInterpolation.icpp.
|
inline |
Constructor
grid | |
values | |
type | |
extrapolate |
Definition at line 181 of file GridInterpolation.icpp.
References std::vector< T >::back(), InterpN(), m_extrapolate, m_interpolators, m_knots, std::move(), Euclid::NdArray::NdArray< T >::rslice(), Euclid::NdArray::NdArray< T >::shape(), std::vector< T >::size(), and Euclid::Tuple::Tail().
Referenced by InterpN(), and InterpN().
|
inline |
Copy constructor.
Definition at line 220 of file GridInterpolation.icpp.
References InterpN(), m_extrapolate, m_interpolators, and m_knots.
Euclid::MathUtils::InterpN< AxisType >::InterpN | ( | const std::tuple< std::vector< AxisType >... > & | grid, |
const NdArray::NdArray< double > & | values, | ||
bool | extrapolate ) |
Constructor
grid | Knots defining the grid |
values | Grid values |
extrapolate | If true, values will be extrapolated on continuous dimensions |
|
default |
Destructor
double Euclid::MathUtils::InterpN< AxisType >::operator() | ( | AxisType... | args | ) | const |
Interpolate the value for the given parameters
|
inline |
Call as a function
x | Value for the axis for the first dimension |
rest | Values for the next set of axes |
Doubles<Rest>... is used to expand into (N-1) doubles x is used to find the interpolators for x1 and x2 s.t. x1 <= x <=x2 Those two interpolators are used to compute y1 for x1, and y2 for x2 (based on the rest of the parameters) A final linear interpolator is used to get the value of y at the position x
Definition at line 215 of file GridInterpolation.icpp.
References m_extrapolate, m_interpolators, and m_knots.
|
private |
Definition at line 230 of file GridInterpolation.icpp.
Referenced by InterpN(), InterpN(), and operator()().
|
private |
Definition at line 229 of file GridInterpolation.icpp.
Referenced by InterpN(), InterpN(), and operator()().
|
private |
Definition at line 228 of file GridInterpolation.icpp.
Referenced by InterpN(), InterpN(), and operator()().