npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::ClassicalOrthoPoly1DFromWeight< Functor1D > Class Template Reference
Inheritance diagram for npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >:
npstat::AbsClassicalOrthoPoly1D

Public Member Functions

 ClassicalOrthoPoly1DFromWeight (const Functor1D &fcn, const unsigned maxDegree, const unsigned nIntegPoints, const long double i_xmin, const long double i_xmax, const OrthoPolyMethod m=OPOLY_STIELTJES, const bool useFejerQuadrature=true)
 
virtual ClassicalOrthoPoly1DFromWeightclone () 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 (const unsigned deg) const
 
virtual std::pair< long double, long double > recurrenceCoeffs (const 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

◆ ClassicalOrthoPoly1DFromWeight()

template<class Functor1D >
npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >::ClassicalOrthoPoly1DFromWeight ( const Functor1D &  fcn,
const unsigned  maxDegree,
const unsigned  nIntegPoints,
const long double  i_xmin,
const long double  i_xmax,
const OrthoPolyMethod  m = OPOLY_STIELTJES,
const bool  useFejerQuadrature = true 
)
inline

"nIntegPoints" parameter is the number of integration points for the Fejer or rectangular rule 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.

Rectangular rule quadrature can be used for densities whose multiple derivatives become very close to 0 near the support boundaries. In particular, rectangular quadrature is expected to be useful for KDE densities estimated with symmetric beta kernels without boundary correction and with support on an appropriately extended interval.

Member Function Documentation

◆ clone()

template<class Functor1D >
virtual ClassicalOrthoPoly1DFromWeight* npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >::clone ( ) const
inlinevirtual

Virtual copy constructor

Implements npstat::AbsClassicalOrthoPoly1D.

◆ maxDegree()

template<class Functor1D >
virtual unsigned npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >::maxDegree ( ) const
inlinevirtual

Maximum polynomial degree supported

Reimplemented from npstat::AbsClassicalOrthoPoly1D.

◆ weight()

template<class Functor1D >
virtual long double npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >::weight ( const long double  x) const
inlinevirtual

The weight function should be normalized

Implements npstat::AbsClassicalOrthoPoly1D.

◆ xmin()

template<class Functor1D >
virtual double npstat::ClassicalOrthoPoly1DFromWeight< Functor1D >::xmin ( ) const
inlinevirtual

Support of the polynomial

Implements npstat::AbsClassicalOrthoPoly1D.


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