npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::OrthoPoly1D Class Reference

Public Member Functions

 OrthoPoly1D (const OrthoPoly1D &)
 
 OrthoPoly1D (unsigned maxDegree, const double *weight, unsigned weightLen, double step)
 
OrthoPoly1Doperator= (const OrthoPoly1D &)
 
unsigned length () const
 
unsigned maxDegree () const
 
double step () const
 
bool operator== (const OrthoPoly1D &r) const
 
bool operator!= (const OrthoPoly1D &r) const
 
double weight (unsigned index) const
 
double poly (unsigned deg, unsigned index) const
 
double polyTimesWeight (unsigned deg, unsigned index) const
 
double series (const double *coeffs, unsigned maxdeg, unsigned index) const
 
template<typename Numeric >
void linearFilter (const double *coeffs, unsigned maxdeg, unsigned index, Numeric *result, unsigned lenResult) const
 
template<typename Numeric >
void globalFilter (const double *coeffs, unsigned maxdeg, Numeric *result, unsigned long lenResult) const
 
template<typename Numeric >
void globalFilterDiag (const double *coeffs, unsigned maxdeg, Numeric *result, unsigned lenResult) const
 
void calculateCoeffs (const double *data, unsigned dataLen, double *coeffs, unsigned maxdeg) const
 
void densityCoeffs (const double *data, unsigned dataLen, double *coeffs, unsigned maxdeg) const
 
void densityCoeffsVariance (const double *data, unsigned dataLen, double *coeffs, unsigned maxdeg, double effectiveSampleSize) const
 
double empiricalKroneckerDelta (unsigned deg1, unsigned deg2) const
 
void weightExpansionCoeffs (double *coeffs, unsigned maxdeg) const
 
double weightExpansionCovariance (unsigned deg1, unsigned deg2) const
 
double unweightedPolyProduct (unsigned deg1, unsigned deg2) const
 

Friends

class Private::OrthoPoly1DSprodCalc
 

Member Function Documentation

◆ calculateCoeffs()

void npstat::OrthoPoly1D::calculateCoeffs ( const double *  data,
unsigned  dataLen,
double *  coeffs,
unsigned  maxdeg 
) const

Build the coefficients of the orthogonal polynomial series for the given function. "dataLen" should be equal to "weightLen" provided in the constructor. The length of the array "coeffs" should be at least "maxdeg" + 1. Note that the coefficients are returned in the order of increasing degree (same order is used by the "series" function).

◆ empiricalKroneckerDelta()

double npstat::OrthoPoly1D::empiricalKroneckerDelta ( unsigned  deg1,
unsigned  deg2 
) const

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

◆ globalFilter()

template<typename Numeric >
void npstat::OrthoPoly1D::globalFilter ( const double *  coeffs,
unsigned  maxdeg,
Numeric *  result,
unsigned long  lenResult 
) const

Generate a global filter (OSDE-style). "coeffs" are the taper function coefficients. The length of the "result" array should be equal to the square of the length of the weight given in the constructor. It will be assumed that "result" will later be treated as a square matrix which will be multiplied by a column of input data.

◆ globalFilterDiag()

template<typename Numeric >
void npstat::OrthoPoly1D::globalFilterDiag ( const double *  coeffs,
unsigned  maxdeg,
Numeric *  result,
unsigned  lenResult 
) const

Obtain just the main diagonal of the global filter

◆ length()

unsigned npstat::OrthoPoly1D::length ( ) const
inline

A simple inspector of object properties

◆ linearFilter()

template<typename Numeric >
void npstat::OrthoPoly1D::linearFilter ( const double *  coeffs,
unsigned  maxdeg,
unsigned  index,
Numeric *  result,
unsigned  lenResult 
) const

Generate a linear filter for the point with the given index. "coeffs" are the taper function coefficients. The length of the result should be equal to the length of the weight given in the constructor.

◆ operator=()

OrthoPoly1D& npstat::OrthoPoly1D::operator= ( const OrthoPoly1D )

The assignment operator

◆ operator==()

bool npstat::OrthoPoly1D::operator== ( const OrthoPoly1D r) const

Compare for equality

◆ poly()

double npstat::OrthoPoly1D::poly ( unsigned  deg,
unsigned  index 
) const

Return the value of one of the polynomials for the given index

◆ polyTimesWeight()

double npstat::OrthoPoly1D::polyTimesWeight ( unsigned  deg,
unsigned  index 
) const

Product of the weight function and one of the polynomials for the given index

◆ series()

double npstat::OrthoPoly1D::series ( const double *  coeffs,
unsigned  maxdeg,
unsigned  index 
) const

Return the values of the orthogonal polynomial series at the point with the given index

◆ unweightedPolyProduct()

double npstat::OrthoPoly1D::unweightedPolyProduct ( unsigned  deg1,
unsigned  deg2 
) const

Scalar products between polynomials without the weight

◆ weight()

double npstat::OrthoPoly1D::weight ( unsigned  index) const

Return the weight function value for the given index

◆ weightExpansionCoeffs()

void npstat::OrthoPoly1D::weightExpansionCoeffs ( double *  coeffs,
unsigned  maxdeg 
) const

Orthogonal series for the weight function itself. The length of the array "coeffs" should be at least maxdeg + 1.

◆ weightExpansionCovariance()

double npstat::OrthoPoly1D::weightExpansionCovariance ( unsigned  deg1,
unsigned  deg2 
) const

Covariance matrix between weight expansion coefficients in the assumption that the weight function is a probability that is being sampled. The covariance is calculated for a single point sample. If the sample has N points, the covariance matrix should be divided by N (this assumes that the weight expansion coefficients are determined for a normalized EDF).


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