Alexandria 2.31.2
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > > Struct Template Reference
Inheritance diagram for Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >:
Collaboration diagram for Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >:

Classes

struct  Doubles
 
struct  Vectors
 

Public Member Functions

 InterpNAdapter (const Coordinates< N > &grid, const NdArray::NdArray< double > &values, InterpolationType type, bool extrapolate)
 
double operator() (typename Doubles< Is >::type... xn) const override
 
void operator() (const typename Vectors< Is >::type &..., std::vector< double > &) const override
 
std::unique_ptr< NAryFunction< N > > clone () const override
 
 InterpNAdapter (const InterpNAdapter &)=default
 
- Public Member Functions inherited from Euclid::MathUtils::NAryFunction< N >

Private Attributes

InterpN< typename Doubles< Is >::type... > m_interpn
 

Detailed Description

template<std::size_t N, std::size_t... Is>
struct Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >

@description GridInterpolation expects the data to follow GridContainer memory layout, but originally interpn is expected to follow a numpy memory layout. We use template dirty tricks to re-use GridInterpolation, transposing the axis at creation time, and the arguments at interpolation time

Definition at line 22 of file interpolation.icpp.

Constructor & Destructor Documentation

◆ InterpNAdapter() [1/2]

template<std::size_t N, std::size_t... Is>
Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::InterpNAdapter ( const Coordinates< N > & grid,
const NdArray::NdArray< double > & values,
InterpolationType type,
bool extrapolate )
inline

Definition at line 34 of file interpolation.icpp.

◆ InterpNAdapter() [2/2]

template<std::size_t N, std::size_t... Is>
Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::InterpNAdapter ( const InterpNAdapter< N, _index_sequence< Is... > > & )
default

Member Function Documentation

◆ clone()

template<std::size_t N, std::size_t... Is>
std::unique_ptr< NAryFunction< N > > Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::clone ( ) const
inlineoverridevirtual

Creates a clone of the function object. All subclasses must implement this method, to enable copying of Function objects when only a reference to the Function class is available.

Returns
A copy of the Function object

Implements Euclid::MathUtils::NAryFunction< N >.

Definition at line 51 of file interpolation.icpp.

References Euclid::make_unique().

Here is the call graph for this function:

◆ operator()() [1/2]

template<std::size_t N, std::size_t... Is>
void Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::operator() ( const typename Vectors< Is >::type & ...,
std::vector< double > &  ) const
inlineoverride

Definition at line 47 of file interpolation.icpp.

◆ operator()() [2/2]

template<std::size_t N, std::size_t... Is>
double Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::operator() ( typename Doubles< Is >::type... xn) const
inlineoverride

Definition at line 42 of file interpolation.icpp.

References std::make_tuple().

Here is the call graph for this function:

Member Data Documentation

◆ m_interpn

template<std::size_t N, std::size_t... Is>
InterpN<typename Doubles<Is>::type...> Euclid::MathUtils::InterpNAdapter< N, _index_sequence< Is... > >::m_interpn
private

Definition at line 58 of file interpolation.icpp.


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