npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::DensityOrthoPoly1D Class Reference
Inheritance diagram for npstat::DensityOrthoPoly1D:
npstat::AbsClassicalOrthoPoly1D

Public Member Functions

 DensityOrthoPoly1D (const AbsDistribution1D &distro, unsigned maxDegree, unsigned nIntegPoints, OrthoPolyMethod m=OPOLY_STIELTJES)
 
 DensityOrthoPoly1D (const DensityOrthoPoly1D &)
 
DensityOrthoPoly1Doperator= (const DensityOrthoPoly1D &)
 
virtual DensityOrthoPoly1Dclone () const
 
virtual long double weight (const long double x) const
 
virtual double xmin () const
 
virtual double xmax () const
 
virtual unsigned maxDegree () const
 
virtual std::pair< long double, long double > monicRecurrenceCoeffs (unsigned deg) const
 
virtual std::pair< long double, long double > recurrenceCoeffs (unsigned deg) const
 
- Public Member Functions inherited from npstat::AbsClassicalOrthoPoly1D
Matrix< long double > jacobiMatrix (unsigned n) const
 
long double poly (unsigned deg, long double x) const
 
long double monic (unsigned deg, long double x) const
 
std::pair< long double, long double > twopoly (unsigned deg1, unsigned deg2, long double x) const
 
void allpoly (long double x, long double *values, unsigned maxdeg) const
 
void allmonic (long double x, long double *values, unsigned maxdeg) const
 
double series (const double *coeffs, unsigned maxdeg, double x) const
 
double integrateSeries (const double *coeffs, 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, unsigned long lenCoords, double *coeffs, unsigned maxdeg) const
 
template<class Numeric >
void sampleCoeffVars (const Numeric *coords, unsigned long lenCoords, const double *coeffs, unsigned maxdeg, double *variances) const
 
template<class Numeric >
Matrix< double > sampleCoeffCovariance (const Numeric *coords, unsigned long lenCoords, const double *coeffs, unsigned maxdeg) const
 
template<class Numeric >
void sampleCoeffs (const Numeric *coords, unsigned long lenCoords, Numeric location, Numeric scale, double *coeffs, unsigned maxdeg) const
 
template<class Numeric >
void sampleCoeffVars (const Numeric *coords, unsigned long lenCoords, Numeric location, Numeric scale, const double *coeffs, unsigned maxdeg, double *variances) const
 
template<class Numeric >
Matrix< double > sampleCoeffCovariance (const Numeric *coords, unsigned long lenCoords, Numeric location, Numeric scale, const double *coeffs, unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffs (const Pair *points, unsigned long numPoints, double *coeffs, unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffVars (const Pair *points, unsigned long nPoints, const double *coeffs, unsigned maxdeg, double *variances) const
 
template<class Pair >
Matrix< double > weightedSampleCoeffCovariance (const Pair *points, unsigned long nPoints, const double *coeffs, unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffs (const Pair *points, unsigned long numPoints, typename Pair::first_type location, typename Pair::first_type scale, double *coeffs, unsigned maxdeg) const
 
template<class Pair >
void weightedSampleCoeffVars (const Pair *points, unsigned long nPoints, typename Pair::first_type location, typename Pair::first_type scale, const double *coeffs, unsigned maxdeg, double *variances) const
 
template<class Pair >
Matrix< double > weightedSampleCoeffCovariance (const Pair *points, unsigned long nPoints, typename Pair::first_type location, typename Pair::first_type scale, const double *coeffs, unsigned maxdeg) const
 
template<class Quadrature >
double empiricalKroneckerDelta (const Quadrature &quad, unsigned deg1, unsigned deg2) const
 
Matrix< double > empiricalKroneckerMatrix (const AbsIntervalQuadrature1D &quad, unsigned maxdeg) const
 
template<class Quadrature >
double jointAverage (const Quadrature &q, unsigned deg1, unsigned deg2, unsigned deg3, unsigned deg4) const
 
template<class Quadrature >
double jointAverage (const Quadrature &q, const unsigned *degrees, unsigned nDegrees, bool checkedForZeros=false) const
 
template<class Quadrature >
double directQuadrature (const Quadrature &q, unsigned deg1, unsigned deg2, unsigned deg3, unsigned deg4) const
 
template<class Quadrature >
double directQuadrature (const Quadrature &q, const unsigned *degrees, unsigned nDegrees, bool checkedForZeros=false) const
 
double integratePoly (unsigned degree, unsigned power) const
 
double jointIntegral (const unsigned *degrees, unsigned nDegrees) const
 
template<typename 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 Numeric >
Matrix< double > sampleProductAverages (const Numeric *coords, unsigned long lenCoords, unsigned maxdeg) const
 
template<class Functor >
Matrix< double > extWeightProductAverages (const Functor &extWeight, const AbsIntervalQuadrature1D &quad, unsigned maxdeg) const
 
template<class Numeric >
double jointSampleAverage (const Numeric *coords, unsigned long lenCoords, const unsigned *degrees, unsigned lenDegrees) const
 
template<class Numeric >
std::pair< double, double > twoJointSampleAverages (const Numeric *coords, unsigned long lenCoords, const unsigned *degrees1, unsigned lenDegrees1, const unsigned *degrees2, unsigned lenDegrees2) const
 
CPP11_auto_ptr< StorablePolySeries1DmakeStorablePolySeries (unsigned maxPolyDeg, const double *coeffs=0, unsigned maxdeg=0, double shift=0.0) const
 
long double location () const
 
long double scale () const
 

Additional Inherited Members

- Public Types inherited from npstat::AbsClassicalOrthoPoly1D
typedef OrthoPoly1DDeg degree_functor
 
typedef OrthoPoly1DWeight weight_functor
 
- Static Protected Member Functions inherited from npstat::AbsClassicalOrthoPoly1D
static int kdelta (const unsigned i, const unsigned j)
 

Constructor & Destructor Documentation

◆ DensityOrthoPoly1D()

npstat::DensityOrthoPoly1D::DensityOrthoPoly1D ( const AbsDistribution1D distro,
unsigned  maxDegree,
unsigned  nIntegPoints,
OrthoPolyMethod  m = OPOLY_STIELTJES 
)

"nIntegPoints" parameter is the number of integration points for the Fejer quadrature. Note that Fejer quadrature with n points can integrate exactly polynomials of degree n-1 and that this quadrature will be used for calculating various inner products in which the density is used as the weight. Therefore, "nIntegPoints" should be at least 2*maxDegree + 1 + C, where "C" is the polynomial degree that can be used to approximate the density reasonably well.

The support of the weight for the integration purpose will be set to [distro.quantile(0.0), distro.quantile(1.0)]. If this interval is very wide, the results may be meaningless (monomials like x^n can exceed the floating point dynamic range, etc).

Member Function Documentation

◆ clone()

virtual DensityOrthoPoly1D* npstat::DensityOrthoPoly1D::clone ( ) const
inlinevirtual

Virtual copy constructor

Implements npstat::AbsClassicalOrthoPoly1D.

◆ maxDegree()

virtual unsigned npstat::DensityOrthoPoly1D::maxDegree ( ) const
inlinevirtual

Maximum polynomial degree supported

Reimplemented from npstat::AbsClassicalOrthoPoly1D.

◆ weight()

virtual long double npstat::DensityOrthoPoly1D::weight ( const long double  x) const
inlinevirtual

The weight function should be normalized

Implements npstat::AbsClassicalOrthoPoly1D.

◆ xmin()

virtual double npstat::DensityOrthoPoly1D::xmin ( ) const
inlinevirtual

Support of the polynomial

Implements npstat::AbsClassicalOrthoPoly1D.


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