npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::OrthoPolyND< MaxDeg > Class Template Reference

#include <OrthoPolyND.hh>

Public Types

enum  { deg_size = MaxDeg }
 

Public Member Functions

 OrthoPolyND (unsigned polyDegree, const ArrayND< double > &weight, const double *steps=0, unsigned nSteps=0)
 
 OrthoPolyND (const OrthoPolyND &)
 
OrthoPolyNDoperator= (const OrthoPolyND &)
 
unsigned dim () const
 
unsigned maxDegree () const
 
unsigned nTerms () const
 
unsigned degree (const unsigned termNumber) const
 
double step (const unsigned nd) const
 
const ArrayND< double > & weight () const
 
double poly (const unsigned termNumber, const unsigned *ix, const unsigned lenIx) const
 
bool operator== (const OrthoPolyND &r) const
 
bool operator!= (const OrthoPolyND &r) const
 
double series (const double *coeffs, unsigned lenCoeffs, const unsigned *ix, unsigned lenIx) const
 
ArrayND< double > arraySeries (const double *coeffs, unsigned lenCoeffs) const
 
ArrayND< double > * linearFilter (const double *coeffs, unsigned lenCoeffs, const unsigned *ix, unsigned lenIx) const
 
void calculateCoeffs (const ArrayND< double > &gridData, const unsigned *shift, unsigned lenShift, double *coeffs, unsigned lenCoeffs) const
 
double empiricalKroneckerDelta (unsigned term1, unsigned term2) const
 

Static Public Member Functions

static unsigned classMaxDegree ()
 

Detailed Description

template<unsigned MaxDeg>
class npstat::OrthoPolyND< MaxDeg >

This class is templated on the maximum polynomial degree that can be used

Constructor & Destructor Documentation

◆ OrthoPolyND() [1/2]

template<unsigned MaxDeg>
npstat::OrthoPolyND< MaxDeg >::OrthoPolyND ( unsigned  polyDegree,
const ArrayND< double > &  weight,
const double *  steps = 0,
unsigned  nSteps = 0 
)

Main constructor. The "polyDegree" parameter must not exceed the "MaxDeg" template parameter.

"weight" is an arbitrary weight function, specified by its values on a grid with equidistant steps in each dimension.

"steps" is the array of steps. It can be specified as NULL. In such a case the width of the integration region in each dimension is assumed to be 1.0 and the step in each dimension D is calculated as 1.0/weight.span(D).

◆ OrthoPolyND() [2/2]

template<unsigned MaxDeg>
npstat::OrthoPolyND< MaxDeg >::OrthoPolyND ( const OrthoPolyND< MaxDeg > &  )

Copy constructor

Member Function Documentation

◆ arraySeries()

template<unsigned MaxDeg>
ArrayND<double> npstat::OrthoPolyND< MaxDeg >::arraySeries ( const double *  coeffs,
unsigned  lenCoeffs 
) const

Series on the whole hyperrectangle

◆ calculateCoeffs()

template<unsigned MaxDeg>
void npstat::OrthoPolyND< MaxDeg >::calculateCoeffs ( const ArrayND< double > &  gridData,
const unsigned *  shift,
unsigned  lenShift,
double *  coeffs,
unsigned  lenCoeffs 
) const

Build the series for the given gridded data. "shift" is the offset with which the sliding window of the weight will be placed inside "gridData". The "shift" array can be NULL in which case it will be assumed that all shift values are 0.

◆ degree()

template<unsigned MaxDeg>
unsigned npstat::OrthoPolyND< MaxDeg >::degree ( const unsigned  termNumber) const
inline

What is the degree of the given term in the series?

◆ dim()

template<unsigned MaxDeg>
unsigned npstat::OrthoPolyND< MaxDeg >::dim ( ) const
inline

What is the dimensionality of the coordinate space?

◆ empiricalKroneckerDelta()

template<unsigned MaxDeg>
double npstat::OrthoPolyND< MaxDeg >::empiricalKroneckerDelta ( unsigned  term1,
unsigned  term2 
) const

This method is useful for testing the numerical precision of the orthonormalization procedure. It returns the scalar products between various polynomials.

◆ linearFilter()

template<unsigned MaxDeg>
ArrayND<double>* npstat::OrthoPolyND< MaxDeg >::linearFilter ( const double *  coeffs,
unsigned  lenCoeffs,
const unsigned *  ix,
unsigned  lenIx 
) const

Generate a linear filter for the given point. Note that this filter is generated on the heap and the user must eventually call the "delete" operator on the result (or just use a smart pointer to hold it).

◆ maxDegree()

template<unsigned MaxDeg>
unsigned npstat::OrthoPolyND< MaxDeg >::maxDegree ( ) const
inline

Maximum polynomial degree

◆ nTerms()

template<unsigned MaxDeg>
unsigned npstat::OrthoPolyND< MaxDeg >::nTerms ( ) const
inline

How many terms the series will have?

◆ operator=()

template<unsigned MaxDeg>
OrthoPolyND& npstat::OrthoPolyND< MaxDeg >::operator= ( const OrthoPolyND< MaxDeg > &  )

The assignment operator

◆ operator==()

template<unsigned MaxDeg>
bool npstat::OrthoPolyND< MaxDeg >::operator== ( const OrthoPolyND< MaxDeg > &  r) const

Compare for equality

◆ poly()

template<unsigned MaxDeg>
double npstat::OrthoPolyND< MaxDeg >::poly ( const unsigned  termNumber,
const unsigned *  ix,
const unsigned  lenIx 
) const
inline

Return the value of one of the polynomials. "ix" is the multivariate index of the array point for which the polynomial value should be returned.

◆ series()

template<unsigned MaxDeg>
double npstat::OrthoPolyND< MaxDeg >::series ( const double *  coeffs,
unsigned  lenCoeffs,
const unsigned *  ix,
unsigned  lenIx 
) const

Series at a single point. The first coefficient refers to the lowest degree polynomial (the constant term). The number of coefficients provided must be equal to the number of terms in the series (as returned by the "nTerms" method).

◆ step()

template<unsigned MaxDeg>
double npstat::OrthoPolyND< MaxDeg >::step ( const unsigned  nd) const
inline

The step size in the given dimension

◆ weight()

template<unsigned MaxDeg>
const ArrayND<double>& npstat::OrthoPolyND< MaxDeg >::weight ( ) const
inline

Get the table of weights


The documentation for this class was generated from the following file: