npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::ConvolutionDensity1D< Kernel > Class Template Reference
Inheritance diagram for npstat::ConvolutionDensity1D< Kernel >:
npstat::Functor1< long double, long double >

Public Types

typedef Kernel kernel_type
 
- Public Types inherited from npstat::Functor1< long double, long double >
typedef long double result_type
 
typedef long double first_argument_type
 

Public Member Functions

template<class Functor1D >
 ConvolutionDensity1D (const Functor1D &fcn, const Kernel &kernel, unsigned nIntegPointsX, double xmin, double xmax, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
 
template<typename Numeric >
 ConvolutionDensity1D (const Kernel &kernel, const Numeric *coords, unsigned lenCoords, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
 
template<typename Numeric1 , typename Numeric2 >
 ConvolutionDensity1D (const Kernel &kernel, const Numeric1 *coords, unsigned lenCoords, const Numeric2 *weights, unsigned lenWeights, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
 
template<typename Numeric1 , typename Numeric2 >
 ConvolutionDensity1D (const Kernel &kernel, const std::vector< std::pair< Numeric1, Numeric2 > > &points, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
 
long double operator() (const long double &y) const
 
long double variance (long double y, long double sampleSize) const
 
long double covariance (long double y, long double z, long double sampleSize) const
 

Constructor & Destructor Documentation

◆ ConvolutionDensity1D() [1/4]

template<class Kernel >
template<class Functor1D >
npstat::ConvolutionDensity1D< Kernel >::ConvolutionDensity1D ( const Functor1D &  fcn,
const Kernel &  kernel,
unsigned  nIntegPointsX,
double  xmin,
double  xmax,
unsigned  nIntegPointsY = 0,
double  ymin = 0.,
double  ymax = 0. 
)

In the following constructor, the input functor "fcn" must represent a smooth 1-d density. If it is not normalized, it will be normalized internally. xmin and xmax represent the interval on which the integration is performed used Gauss-Legendre quadrature with nIntegPointsX points. Provide arguments nIntegPointsY, ymin, and ymax if you want automatic kernel normalization in the y direction (also with a Gauss-Legendre quadrature).

◆ ConvolutionDensity1D() [2/4]

template<class Kernel >
template<typename Numeric >
npstat::ConvolutionDensity1D< Kernel >::ConvolutionDensity1D ( const Kernel &  kernel,
const Numeric *  coords,
unsigned  lenCoords,
unsigned  nIntegPointsY = 0,
double  ymin = 0.,
double  ymax = 0. 
)

KDE. Provide arguments nIntegPointsY, ymin, and ymax if you want automatic kernel normalization in the y direction (that is, if you want to create a baloon estimator).

◆ ConvolutionDensity1D() [3/4]

template<class Kernel >
template<typename Numeric1 , typename Numeric2 >
npstat::ConvolutionDensity1D< Kernel >::ConvolutionDensity1D ( const Kernel &  kernel,
const Numeric1 *  coords,
unsigned  lenCoords,
const Numeric2 *  weights,
unsigned  lenWeights,
unsigned  nIntegPointsY = 0,
double  ymin = 0.,
double  ymax = 0. 
)

KDE with weighted points. Provide arguments nIntegPointsY, ymin, and ymax if you want automatic kernel normalization in the y direction (that is, if you want to create a baloon estimator).

◆ ConvolutionDensity1D() [4/4]

template<class Kernel >
template<typename Numeric1 , typename Numeric2 >
npstat::ConvolutionDensity1D< Kernel >::ConvolutionDensity1D ( const Kernel &  kernel,
const std::vector< std::pair< Numeric1, Numeric2 > > &  points,
unsigned  nIntegPointsY = 0,
double  ymin = 0.,
double  ymax = 0. 
)

KDE with weighted points. The first argument of the pair is the coordinate and the second is the weight. Provide arguments nIntegPointsY, ymin, and ymax if you want automatic kernel normalization in the y direction (that is, if you want to create a baloon estimator).

Member Function Documentation

◆ covariance()

template<class Kernel >
long double npstat::ConvolutionDensity1D< Kernel >::covariance ( long double  y,
long double  z,
long double  sampleSize 
) const

Expected density covariance at (y, z) for the unweighted sample of given size

◆ operator()()

template<class Kernel >
long double npstat::ConvolutionDensity1D< Kernel >::operator() ( const long double &  y) const
virtual

Convolution density at y

Implements npstat::Functor1< long double, long double >.

◆ variance()

template<class Kernel >
long double npstat::ConvolutionDensity1D< Kernel >::variance ( long double  y,
long double  sampleSize 
) const

Expected density variance at y for the unweighted sample of given size


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