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

Public Types

typedef ScalableOrthoPoly1DDeg degree_functor
 
typedef ScalableOrthoPoly1DWeight weight_functor
 

Public Member Functions

 ScalableClassicalOrthoPoly1D (const AbsClassicalOrthoPoly1D &poly, long double location, long double scale)
 
 ScalableClassicalOrthoPoly1D (const AbsClassicalOrthoPoly1D &poly, double location, double scale)
 
 ScalableClassicalOrthoPoly1D (const ScalableClassicalOrthoPoly1D &)
 
ScalableClassicalOrthoPoly1Doperator= (const ScalableClassicalOrthoPoly1D &)
 
ScalableClassicalOrthoPoly1Dclone () const
 
long double location () const
 
long double scale () const
 
Matrix< long double > jacobiMatrix (const unsigned n) const
 
void setLocation (const long double v)
 
void setScale (const long double v)
 
long double weight (const long double x) const
 
double xmin () const
 
double xmax () const
 
unsigned maxDegree () const
 
long double poly (const unsigned deg, const long double x) const
 
long double monic (const unsigned deg, const long double x) const
 
std::pair< long double, long double > twopoly (const unsigned deg1, const unsigned deg2, const long double x) const
 
void allpoly (const long double x, long double *values, const unsigned maxdeg) const
 
void allmonic (const long double x, long double *values, const unsigned maxdeg) const
 
double series (const double *coeffs, const unsigned maxdeg, const double x) const
 
double integrateSeries (const double *coeffs, const unsigned maxdeg) const
 
template<class Functor , class Quadrature >
void calculateCoeffs (const Functor &fcn, const Quadrature &quad, double *coeffs, unsigned maxdeg) const
 
template<class Numeric >
void sampleCoeffs (const Numeric *coords, const unsigned long lenCoords, double *coeffs, const unsigned maxdeg) const
 
template<class Numeric >
void sampleCoeffVars (const Numeric *coords, const unsigned long lenCoords, const double *coeffs, const unsigned maxdeg, double *variances) const
 
template<class Numeric >
npstat::Matrix< double > sampleCoeffCovariance (const Numeric *coords, const unsigned long lenCoords, const double *coeffs, const unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffs (const Pair *points, const unsigned long numPoints, double *coeffs, const unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffVars (const Pair *points, const unsigned long nPoints, const double *coeffs, const unsigned maxdeg, double *variances) const
 
template<class Pair >
npstat::Matrix< double > weightedSampleCoeffCovariance (const Pair *points, const unsigned long nPoints, const double *coeffs, const unsigned maxdeg) const
 
template<class Numeric , typename Real >
void sampleAverages (const Numeric *coords, unsigned long lenCoords, Real *averages, unsigned maxdeg) const
 
template<class Pair , typename Real >
void weightedPointsAverages (const Pair *points, unsigned long numPoints, Real *averages, unsigned maxdeg) const
 
template<class Functor , typename Real >
void extWeightAverages (const Functor &extWeight, const AbsIntervalQuadrature1D &quad, Real *averages, unsigned maxdeg) const
 
template<class Functor >
Matrix< double > extWeightProductAverages (const Functor &extWeight, const AbsIntervalQuadrature1D &quad, unsigned maxdeg) const
 

Member Function Documentation

◆ allpoly()

void npstat::ScalableClassicalOrthoPoly1D::allpoly ( const long double  x,
long double *  values,
const unsigned  maxdeg 
) const
inline

Values of all orthonormal polynomials up to some degree. Faster than calling "poly" multiple times. The size of the "values" array should be at least maxdeg + 1.

◆ calculateCoeffs()

template<class Functor , class Quadrature >
void npstat::ScalableClassicalOrthoPoly1D::calculateCoeffs ( const Functor &  fcn,
const Quadrature &  quad,
double *  coeffs,
unsigned  maxdeg 
) const

Build the coefficients of the orthogonal polynomial series for the given function. 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).

◆ extWeightAverages()

template<class Functor , typename Real >
void npstat::ScalableClassicalOrthoPoly1D::extWeightAverages ( const Functor &  extWeight,
const AbsIntervalQuadrature1D quad,
Real *  averages,
unsigned  maxdeg 
) const

Averages of the polynomial values weighted by an external weight function. The length of array "averages" should be at least maxdeg + 1.

◆ extWeightProductAverages()

template<class Functor >
Matrix<double> npstat::ScalableClassicalOrthoPoly1D::extWeightProductAverages ( const Functor &  extWeight,
const AbsIntervalQuadrature1D quad,
unsigned  maxdeg 
) const

Pairwise products of the polynomial values weighted by an external weight function. The returned matrix will be symmetric and will have the dimensions (maxdeg + 1) x (maxdeg + 1).

◆ sampleAverages()

template<class Numeric , typename Real >
void npstat::ScalableClassicalOrthoPoly1D::sampleAverages ( const Numeric *  coords,
unsigned long  lenCoords,
Real *  averages,
unsigned  maxdeg 
) const

Unweighted averages of the polynomial values for the given sample. The length of array "averages" should be at least maxdeg + 1.

◆ sampleCoeffs()

template<class Numeric >
void npstat::ScalableClassicalOrthoPoly1D::sampleCoeffs ( const Numeric *  coords,
const unsigned long  lenCoords,
double *  coeffs,
const unsigned  maxdeg 
) const
inline

Build the coefficients of the orthogonal polynomial series for the given sample of points (empirical density function). 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).

◆ twopoly()

std::pair<long double,long double> npstat::ScalableClassicalOrthoPoly1D::twopoly ( const unsigned  deg1,
const unsigned  deg2,
const long double  x 
) const
inline

Values of two orthonormal polynomials. Faster than calling "poly" two times.

◆ weightedPointsAverages()

template<class Pair , typename Real >
void npstat::ScalableClassicalOrthoPoly1D::weightedPointsAverages ( const Pair *  points,
unsigned long  numPoints,
Real *  averages,
unsigned  maxdeg 
) const

Averages of the polynomial values for the given sample of weighted points (not weighting by the polynomial weight function). The first element of the pair will be treated as the coordinate and the second element will be treated as weight. Weights must not be negative. The length of array "averages" should be at least maxdeg + 1.

◆ weightedSampleCoeffs()

template<class Pair >
void npstat::ScalableClassicalOrthoPoly1D::weightedSampleCoeffs ( const Pair *  points,
const unsigned long  numPoints,
double *  coeffs,
const unsigned  maxdeg 
) const
inline

Build the coefficients of the orthogonal polynomial series for the given sample of weighted points (empirical density function). The first element of the pair will be treated as the coordinate and the second element will be treated as weight. Weights must not be negative. 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).


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