npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
KDE1DHOSymbetaKernel.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_KDE1DHOSYMBETAKERNEL_HH_
2 #define NPSTAT_KDE1DHOSYMBETAKERNEL_HH_
3 
4 /*!
5 // \file KDE1DHOSymbetaKernel.hh
6 //
7 // \brief High order Gaussian or symmetric beta KDE kernels
8 //
9 // Author: I. Volobouev
10 //
11 // November 2018
12 */
13 
14 #include <vector>
15 
18 
19 namespace npstat {
21  {
22  public:
23  // Use power < 0 for Gaussian. Kernel order will be
24  // "filterDegree" + 2 if "filterDegree" is even,
25  // and "filterDegree" + 1 if "filterDegree" is odd.
26  KDE1DHOSymbetaKernel(int power, double filterDegree, double normfactor=1.0);
27 
29  KDE1DHOSymbetaKernel& operator=(const KDE1DHOSymbetaKernel& r);
30 
31  inline virtual KDE1DHOSymbetaKernel* clone() const
32  {return new KDE1DHOSymbetaKernel(*this);}
33 
34  inline virtual ~KDE1DHOSymbetaKernel() {delete poly_;}
35 
36  virtual void setNormFactor(double normfactor);
37 
38  inline int power() const {return power_;}
39  inline double filterDegree() const {return filterDegree_;}
40  inline double weight(const double x) const {return poly_->weight(x);}
41 
42  inline double xmin() const {return xmin_;}
43  inline double xmax() const {return xmax_;}
44  inline double normFactor() const {return norm_;}
45 
46  double operator()(const double x) const;
47 
48  private:
49  void copyInternals(const KDE1DHOSymbetaKernel& r);
50 
51  int power_;
52  unsigned maxdeg_;
53  double filterDegree_;
54  double xmin_;
55  double xmax_;
56  double lastShrinkage_;
57  double norm_;
58  AbsClassicalOrthoPoly1D* poly_;
59  mutable std::vector<long double> polyValues_;
60  };
61 }
62 
63 #endif // NPSTAT_KDE1DHOSYMBETAKERNEL_HH_
Base class for classical continuous orthonormal polynomials.
Brute-force non-discretized KDE in 1-d. No boundary correction.
virtual long double weight(long double x) const =0
Definition: AbsKDE1DKernel.hh:23
Definition: KDE1DHOSymbetaKernel.hh:21
virtual KDE1DHOSymbetaKernel * clone() const
Definition: KDE1DHOSymbetaKernel.hh:31
Definition: AbsArrayProjector.hh:14