#include <rescanArray.h>
Public Member Functions | |
ArrayMapper (const ArrayND< Num1, Len1, Dim1 > &from, const ArrayND< Num2, Len2, Dim2 > &to, const unsigned interpolationDegree) | |
Num1 | operator() (const unsigned *index, unsigned indexLen) const |
Private Attributes | |
unsigned | dim_ |
const ArrayND< Num1, Len1, Dim1 > & | from_ |
unsigned | ideg_ |
std::vector< double > | mapped_ |
std::vector< LinearMapper1d > | mappers_ |
Definition at line 44 of file rescanArray.h.
npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ArrayMapper | ( | const ArrayND< Num1, Len1, Dim1 > & | from, |
const ArrayND< Num2, Len2, Dim2 > & | to, | ||
const unsigned | interpolationDegree | ||
) | [inline] |
Definition at line 47 of file rescanArray.h.
References npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::dim_, i, npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mappers_, npstat::ArrayND< Numeric, StackLen, StackDim >::rank(), and npstat::ArrayND< Numeric, StackLen, StackDim >::span().
Num1 npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator() | ( | const unsigned * | index, |
unsigned | indexLen | ||
) | const [inline] |
Definition at line 66 of file rescanArray.h.
References npstat::ArrayND< Numeric, StackLen, StackDim >::closest(), npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::dim_, npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::from_, i, npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ideg_, npstat::ArrayND< Numeric, StackLen, StackDim >::interpolate1(), npstat::ArrayND< Numeric, StackLen, StackDim >::interpolate3(), m, npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mapped_, and npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mappers_.
{ if (dim_) { const LinearMapper1d* m = &mappers_[0]; double* coords = &mapped_[0]; for (unsigned i=0; i<dim_; ++i) coords[i] = m[i](index[i]); switch (ideg_) { case 0U: return from_.closest(coords, dim_); case 1U: return from_.interpolate1(coords, dim_); case 3U: return from_.interpolate3(coords, dim_); default: assert(0); } } return from_(); }
unsigned npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::dim_ [private] |
Definition at line 96 of file rescanArray.h.
Referenced by npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ArrayMapper(), and npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator()().
const ArrayND<Num1,Len1,Dim1>& npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::from_ [private] |
Definition at line 95 of file rescanArray.h.
Referenced by npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator()().
unsigned npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ideg_ [private] |
Definition at line 97 of file rescanArray.h.
Referenced by npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator()().
std::vector<double> npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mapped_ [mutable, private] |
Definition at line 94 of file rescanArray.h.
Referenced by npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator()().
std::vector<LinearMapper1d> npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mappers_ [private] |
Definition at line 93 of file rescanArray.h.
Referenced by npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ArrayMapper(), and npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator()().