Bayeux  3.4.1
Core Foundation library for SuperNEMO
kernel_smoother.h
Go to the documentation of this file.
1 // \file mygsl/kernel_smoother.h
2 
3 #ifndef MYGSL_KERNEL_SMOOTHER_H
4 #define MYGSL_KERNEL_SMOOTHER_H
5 
6 // This project:
9 
10 namespace mygsl {
11 
14  {
15  virtual ~i_kernel_smoother();
16 
17  virtual double eval(double xs_, double x_) const = 0;
18  };
19 
22  : public i_kernel_smoother
23  {
24  public:
25 
27  gauss_kernel_smoother(const double b_);
28 
29  virtual ~gauss_kernel_smoother();
30 
31  double eval(double xs_, double x_) const override;
32 
33  private:
34 
35  double _b_;
36 
37  };
38 
41  : public i_unary_function
42  {
43  public:
44 
47  i_kernel_smoother & ks_);
48 
51  const double b_);
52 
55 
56  protected:
57 
59  double _eval(double x_) const;
60 
61  private:
62 
63  const mygsl::tabulated_function & _tf_;
64  bool _ks_free_needed_ = false;
65  i_kernel_smoother * _ks_ = nullptr;
66 
67  };
68 
69 } // namespace mygsl
70 
71 #endif // MYGSL_KERNEL_SMOOTHER_H
72 
73 // Local Variables:
74 // mode: c++
75 // coding: utf-8
76 // End:
nw_sampled_function_smoother(const mygsl::tabulated_function &tf_, i_kernel_smoother &ks_)
Constructor.
virtual ~nw_sampled_function_smoother()
Destructor.
Gauss kernel smoother.
Definition: kernel_smoother.h:21
double eval(double xs_, double x_) const override
virtual double eval(double xs_, double x_) const =0
Tabulated function.
Definition: tabulated_function.h:34
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
Kernel smoother interface.
Definition: kernel_smoother.h:13
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
double _eval(double x_) const
Evaluation of the smoothed function.
Nadaraya-Watson kernel-weigthed average functor.
Definition: kernel_smoother.h:40
gauss_kernel_smoother(const double b_)
Constructor.