|
Go to the documentation of this file. 1 #ifndef NPSTAT_CONVOLUTIONDENSITY1D_HH_
2 #define NPSTAT_CONVOLUTIONDENSITY1D_HH_
21 template < class Kernel>
25 typedef Kernel kernel_type;
36 template< class Functor1D>
38 unsigned nIntegPointsX, double xmin, double xmax,
39 unsigned nIntegPointsY=0, double ymin=0., double ymax=0.);
46 template< typename Numeric>
48 const Numeric* coords, unsigned lenCoords,
49 unsigned nIntegPointsY=0, double ymin=0., double ymax=0.);
56 template< typename Numeric1, typename Numeric2>
58 const Numeric1* coords, unsigned lenCoords,
59 const Numeric2* weights, unsigned lenWeights,
60 unsigned nIntegPointsY=0, double ymin=0., double ymax=0.);
69 template< typename Numeric1, typename Numeric2>
71 const std::vector<std::pair<Numeric1,Numeric2> >& points,
72 unsigned nIntegPointsY=0, double ymin=0., double ymax=0.);
80 long double variance( long double y, long double sampleSize) const;
87 long double sampleSize) const;
89 void normalizeKernel( unsigned nIntegPointsY, double ymin, double ymax);
92 std::vector<long double> xLocations_;
93 std::vector<long double> xDensity_;
94 std::vector<long double> norms_;
100 template < class Kernel>
105 const long double sampleSize)
106 : conv_(conv), sampleSize_(sampleSize) {}
110 inline virtual long double operator()( const long double& y) const
111 { return conv_.variance(y, sampleSize_);}
115 long double sampleSize_;
119 template < class Kernel>
128 template < class Kernel>
133 const long double sampleSize)
134 : conv_(conv), sampleSize_(sampleSize) {}
138 inline virtual long double operator()( const long double& y, const long double& z) const
139 { return conv_.covariance(y, z, sampleSize_);}
143 long double sampleSize_;
146 template < class Kernel>
154 #include "npstat/nm/ConvolutionDensity1D.icc"
Interface definitions and concrete simple functors for a variety of functor-based calculations.
Definition: ConvolutionDensity1D.hh:130
Definition: ConvolutionDensity1D.hh:23
ConvolutionDensity1D(const Functor1D &fcn, const Kernel &kernel, unsigned nIntegPointsX, double xmin, double xmax, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
long double variance(long double y, long double sampleSize) const
ConvolutionDensity1D(const Kernel &kernel, const Numeric1 *coords, unsigned lenCoords, const Numeric2 *weights, unsigned lenWeights, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
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
ConvolutionDensity1D(const Kernel &kernel, const Numeric *coords, unsigned lenCoords, unsigned nIntegPointsY=0, double ymin=0., double ymax=0.)
long double covariance(long double y, long double z, long double sampleSize) const
Definition: ConvolutionDensity1D.hh:102
Definition: AbsArrayProjector.hh:14
Definition: SimpleFunctors.hh:58
Definition: SimpleFunctors.hh:89
|