OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
SavitzkyGolay.h
Go to the documentation of this file.
1 #ifndef CLASSIC_SAVITZKY_GOLAY_FILTER_HH
2 #define CLASSIC_SAVITZKY_GOLAY_FILTER_HH
3 
4 #include "Filters/Filter.h"
5 
6 class SavitzkyGolayFilter: public Filter {
7 public:
8  SavitzkyGolayFilter(int np, int nl, int nr, int m);
10  { ;}
11 
12  void apply(std::vector<double> &histogram);
13  void calc_derivative(std::vector<double> &histogram, const double &h);
14 
15 private:
20  std::vector<double> Coefs_m;
21  std::vector<double> CoefsDeriv_m;
22 
23 };
24 
25 void savgol(std::vector<double> &c, const int &np, const int &nl, const int &nr, const int &ld, const int &m);
26 void convlv(const std::vector<double> &data, const std::vector<double> &respns, const int &isign, std::vector<double> &ans);
27 void ludcmp(std::vector<double> &a, std::vector<int> &indx, double &d);
28 void lubksb(std::vector<double> &a, std::vector<int> &indx, std::vector<double> &b);
29 
30 #endif // CLASSIC_SAVITZKY_GOLAY_FILTER_HH
void lubksb(std::vector< double > &a, std::vector< int > &indx, std::vector< double > &b)
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:45
void ludcmp(std::vector< double > &a, std::vector< int > &indx, double &d)
std::vector< double > CoefsDeriv_m
Definition: SavitzkyGolay.h:21
void calc_derivative(std::vector< double > &histogram, const double &h)
SavitzkyGolayFilter(int np, int nl, int nr, int m)
void apply(std::vector< double > &histogram)
void convlv(const std::vector< double > &data, const std::vector< double > &respns, const int &isign, std::vector< double > &ans)
void savgol(std::vector< double > &c, const int &np, const int &nl, const int &nr, const int &ld, const int &m)
std::vector< double > Coefs_m
Definition: SavitzkyGolay.h:20
const int nr
Definition: ClassicRandom.h:24
Definition: Filter.h:8