OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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
Definition: Filter.h:8
void lubksb(vector< double > &a, vector< int > &indx, vector< double > &b)
void apply(std::vector< double > &histogram)
const int nr
Definition: ClassicRandom.h:24
void ludcmp(vector< double > &a, vector< int > &indx, double &d)
void savgol(double c[], int np, int nl, int nr, int ld, int m)
Definition: savgol.cpp:206
void convlv(double data[], int n, double respns[], int m, int isign, double ans[])
Definition: savgol.cpp:406
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:52
std::vector< double > CoefsDeriv_m
Definition: SavitzkyGolay.h:21
std::vector< double > Coefs_m
Definition: SavitzkyGolay.h:20
void calc_derivative(std::vector< double > &histogram, const double &h)
SavitzkyGolayFilter(int np, int nl, int nr, int m)