1 #ifndef NPSTAT_RESCANARRAY_HH_
2 #define NPSTAT_RESCANARRAY_HH_
28 template<
typename Num1,
unsigned Len1,
unsigned Dim1,
29 typename Num2,
unsigned Len2,
unsigned Dim2>
30 void rescanArray(
const ArrayND<Num1,Len1,Dim1>& from,
31 ArrayND<Num2,Len2,Dim2>*
to,
32 unsigned interpolationDegree=0);
42 template<
typename Num1,
unsigned Len1,
unsigned Dim1,
43 typename Num2,
unsigned Len2,
unsigned Dim2>
49 const unsigned interpolationDegree)
53 ideg_(interpolationDegree)
73 coords[
i] = m[
i](index[
i]);
101 template<
typename Num1,
unsigned Len1,
unsigned Dim1,
102 typename Num2,
unsigned Len2,
unsigned Dim2>
105 const unsigned interpolationDegree)
109 "In npstat::rescanArray: incompatible dimensionalities "
110 "of input and output arrays");
111 if (!(interpolationDegree == 0U ||
112 interpolationDegree == 1U ||
114 "In npstat::rescanArray: unsupported interpolation degree");
116 from, *to, interpolationDegree));
121 #endif // NPSTAT_RESCANARRAY_HH_
Linear transformation functor.
const ArrayND< Num1, Len1, Dim1 > & from_
Numeric & closest(const double *x, unsigned xDim)
void rescanArray(const ArrayND< Num1, Len1, Dim1 > &from, ArrayND< Num2, Len2, Dim2 > *to, unsigned interpolationDegree=0)
unsigned span(unsigned dim) const
Numeric interpolate1(const double *x, unsigned xDim) const
ArrayND & functorFill(Functor f)
Exceptions for the npstat namespace.
ArrayMapper(const ArrayND< Num1, Len1, Dim1 > &from, const ArrayND< Num2, Len2, Dim2 > &to, const unsigned interpolationDegree)
std::vector< LinearMapper1d > mappers_
std::vector< double > mapped_
Arbitrary-dimensional array template.
Num1 operator()(const unsigned *index, unsigned indexLen) const
Numeric interpolate3(const double *x, unsigned xDim) const