1#ifndef INTERPOLATION_IMPL
2#error Please, include "MathUtils/interpolation/interpolation.h"
11template <std::
size_t,
typename Seq>
24 template <std::
size_t>
29 template <std::
size_t>
36 :
m_interpn(
std::tuple<
std::vector<typename
Doubles<Is>::type>...>{grid[N - Is - 1]...}, values, extrapolate) {
44 return m_interpn(std::get<N - Is - 1>(as_tuple)...);
61template <std::
size_t N>
Interface class representing a function with an arbitrary number of parameters.
InterpolationType
Enumeration of the different supported interpolation types.
std::unique_ptr< NAryFunction< N > > interpn(const Coordinates< N > &grid, const NdArray::NdArray< double > &values, InterpolationType type, bool extrapolate)
std::array< std::vector< double >, N > Coordinates
Used to pass the grid coordinates to interpn. Internally will make a copy of the required values.
std::unique_ptr< T > make_unique(Args &&... args)
Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for...
_integer_sequence< std::size_t, Idx... > _index_sequence
std::vector< double > type
InterpNAdapter(const InterpNAdapter &)=default
InterpNAdapter(const Coordinates< N > &grid, const NdArray::NdArray< double > &values, InterpolationType type, bool extrapolate)
void operator()(const typename Vectors< Is >::type &..., std::vector< double > &) const override
InterpN< typename Doubles< Is >::type... > m_interpn
std::unique_ptr< NAryFunction< N > > clone() const override
double operator()(typename Doubles< Is >::type... xn) const override