CMS 3D CMS Logo

Public Member Functions | Private Attributes

npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 > Class Template Reference

#include <rescanArray.h>

List of all members.

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< LinearMapper1dmappers_

Detailed Description

template<typename Num1, unsigned Len1, unsigned Dim1, typename Num2, unsigned Len2, unsigned Dim2>
class npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >

Definition at line 44 of file rescanArray.h.


Constructor & Destructor Documentation

template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
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().

                : mapped_(from.rank()),
                  from_(from),
                  dim_(from.rank()),
                  ideg_(interpolationDegree)
            {
                assert(dim_ == to.rank());
                if (dim_)
                {
                    mappers_.reserve(dim_);
                    for (unsigned i=0; i<dim_; ++i)
                        mappers_.push_back(LinearMapper1d(-0.5, -0.5,
                                                          to.span(i) - 0.5,
                                                          from.span(i) - 0.5));
                }
            }

Member Function Documentation

template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
Num1 npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::operator() ( const unsigned *  index,
unsigned  indexLen 
) const [inline]

Member Data Documentation

template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
unsigned npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::dim_ [private]
template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
const ArrayND<Num1,Len1,Dim1>& npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::from_ [private]
template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
unsigned npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::ideg_ [private]
template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
std::vector<double> npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mapped_ [mutable, private]
template<typename Num1 , unsigned Len1, unsigned Dim1, typename Num2 , unsigned Len2, unsigned Dim2>
std::vector<LinearMapper1d> npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mappers_ [private]