Alexandria 2.31.2
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::MathUtils::InterpN< T > Class Template Reference
Collaboration diagram for Euclid::MathUtils::InterpN< T >:

Public Member Functions

 InterpN (const std::tuple< std::vector< T > > &grid, const NdArray::NdArray< double > &values, bool extrapolate)
 
double operator() (const T x) const
 
 InterpN (const InterpN &)=default
 Copy constructor.
 
 InterpN (InterpN &&)=default
 Move 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< double > m_values
 
bool m_extrapolate
 

Detailed Description

template<typename T>
class Euclid::MathUtils::InterpN< T >

Specialization (and end of the recursion) for a 1-dimensional interpolation.

Definition at line 120 of file GridInterpolation.icpp.

Constructor & Destructor Documentation

◆ InterpN() [1/4]

template<typename T>
Euclid::MathUtils::InterpN< T >::InterpN ( const std::tuple< std::vector< T > > & grid,
const NdArray::NdArray< double > & values,
bool extrapolate )
inline

Constructor

Parameters
gridA 1-dimensional grid
values
type
extrapolate

Definition at line 130 of file GridInterpolation.icpp.

References m_extrapolate, m_knots, m_values, Euclid::NdArray::NdArray< T >::shape(), Euclid::NdArray::NdArray< T >::size(), and std::vector< T >::size().

Referenced by InterpN(), and InterpN().

Here is the call graph for this function:

◆ InterpN() [2/4]

template<typename T>
Euclid::MathUtils::InterpN< T >::InterpN ( const InterpN< T > & )
default

Copy constructor.

References InterpN().

Here is the call graph for this function:

◆ InterpN() [3/4]

template<typename T>
Euclid::MathUtils::InterpN< T >::InterpN ( InterpN< T > && )
default

Move constructor.

References InterpN().

Here is the call graph for this function:

◆ InterpN() [4/4]

Euclid::MathUtils::InterpN< AxisType >::InterpN ( const std::tuple< std::vector< AxisType >... > & grid,
const NdArray::NdArray< double > & values,
bool extrapolate )

Constructor

Parameters
gridKnots defining the grid
valuesGrid values
extrapolateIf true, values will be extrapolated on continuous dimensions
Warning
The memory layout of values is expected to follow the same as GridContainer: the faster changing axis (the last) corresponds to the first grid axis

◆ ~InterpN()

Euclid::MathUtils::InterpN< AxisType >::~InterpN ( )
default

Destructor

Member Function Documentation

◆ operator()() [1/2]

double Euclid::MathUtils::InterpN< AxisType >::operator() ( AxisType... args) const

Interpolate the value for the given parameters

◆ operator()() [2/2]

template<typename T>
double Euclid::MathUtils::InterpN< T >::operator() ( const T x) const
inline

Call as a function

Parameters
xCoordinate value
Returns
Interpolated value

Definition at line 149 of file GridInterpolation.icpp.

References m_extrapolate, m_knots, and m_values.

Member Data Documentation

◆ m_extrapolate

template<typename T>
bool Euclid::MathUtils::InterpN< T >::m_extrapolate
private

Definition at line 162 of file GridInterpolation.icpp.

Referenced by InterpN(), and operator()().

◆ m_knots

template<typename T>
std::vector<T> Euclid::MathUtils::InterpN< T >::m_knots
private

Definition at line 160 of file GridInterpolation.icpp.

Referenced by InterpN(), and operator()().

◆ m_values

template<typename T>
std::vector<double> Euclid::MathUtils::InterpN< T >::m_values
private

Definition at line 161 of file GridInterpolation.icpp.

Referenced by InterpN(), and operator()().


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