CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 > Class Template Reference

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

◆ ArrayMapper()

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.

50  : mapped_(from.rank()),
51  from_(from),
52  dim_(from.rank()),
53  ideg_(interpolationDegree)
54  {
55  assert(dim_ == to.rank());
56  if (dim_)
57  {
58  mappers_.reserve(dim_);
59  for (unsigned i=0; i<dim_; ++i)
60  mappers_.push_back(LinearMapper1d(-0.5, -0.5,
61  to.span(i) - 0.5,
62  from.span(i) - 0.5));
63  }
64  }

References cms::cuda::assert(), npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::dim_, mps_fire::i, npstat::Private::ArrayMapper< Num1, Len1, Dim1, Num2, Len2, Dim2 >::mappers_, and npstat::ArrayND< Numeric, StackLen, StackDim >::span().

Member Function Documentation

◆ operator()()

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

◆ dim_

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

◆ from_

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

◆ ideg_

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

◆ mapped_

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_
mutableprivate

◆ mappers_

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
npstat::ArrayND::interpolate3
Numeric interpolate3(const double *x, unsigned xDim) const
Definition: ArrayND.h:4309
mps_fire.i
i
Definition: mps_fire.py:355
to
cms::cuda::assert
assert(be >=bs)
npstat::ArrayND::rank
unsigned rank() const
Definition: ArrayND.h:242
npstat::Private::ArrayMapper::mappers_
std::vector< LinearMapper1d > mappers_
Definition: rescanArray.h:93
npstat::Private::ArrayMapper::ideg_
unsigned ideg_
Definition: rescanArray.h:97
npstat::ArrayND::closest
Numeric & closest(const double *x, unsigned xDim)
Definition: ArrayND.h:3173
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
npstat::Private::ArrayMapper::dim_
unsigned dim_
Definition: rescanArray.h:96
npstat::ArrayND::span
unsigned span(unsigned dim) const
Definition: ArrayND.h:5088
npstat::ArrayND::interpolate1
Numeric interpolate1(const double *x, unsigned xDim) const
Definition: ArrayND.h:4211
npstat::Private::ArrayMapper::mapped_
std::vector< double > mapped_
Definition: rescanArray.h:94
npstat::Private::ArrayMapper::from_
const ArrayND< Num1, Len1, Dim1 > & from_
Definition: rescanArray.h:95
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46