OPAL (Object Oriented Parallel Accelerator Library) 2022.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
7public:
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
15private:
20 std::vector<double> Coefs_m;
21 std::vector<double> CoefsDeriv_m;
22
23};
24
25void savgol(std::vector<double> &c, const int &np, const int &nl, const int &nr, const int &ld, const int &m);
26void convlv(const std::vector<double> &data, const std::vector<double> &respns, const int &isign, std::vector<double> &ans);
27void ludcmp(std::vector<double> &a, std::vector<int> &indx, double &d);
28void lubksb(std::vector<double> &a, std::vector<int> &indx, std::vector<double> &b);
29
30#endif // CLASSIC_SAVITZKY_GOLAY_FILTER_HH
void convlv(const std::vector< double > &data, const std::vector< double > &respns, const int &isign, std::vector< double > &ans)
void ludcmp(std::vector< double > &a, std::vector< int > &indx, double &d)
void lubksb(std::vector< double > &a, std::vector< int > &indx, std::vector< double > &b)
void savgol(std::vector< double > &c, const int &np, const int &nl, const int &nr, const int &ld, const int &m)
const int nr
Definition: ClassicRandom.h:24
std::complex< double > a
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:45
Definition: Filter.h:8
void apply(std::vector< double > &histogram)
std::vector< double > Coefs_m
Definition: SavitzkyGolay.h:20
std::vector< double > CoefsDeriv_m
Definition: SavitzkyGolay.h:21
SavitzkyGolayFilter(int np, int nl, int nr, int m)
void calc_derivative(std::vector< double > &histogram, const double &h)