sablib
Loading...
Searching...
No Matches
savitzky_golay.h
Go to the documentation of this file.
1
9
10#ifndef __SABLIB_SAVITZKY_GOLAY_H__
11#define __SABLIB_SAVITZKY_GOLAY_H__
12
13#include <stdexcept>
14#include <vector>
15
16namespace sablib {
17
28const std::vector<double> SavitzkyGolayCoefficients(
29 const unsigned int n, const unsigned int polyorder, const unsigned derive = 0, const double delta = 1
30);
31
43const std::vector<double> SavitzkyGolay(
44 const std::vector<double> & y,
45 const unsigned int n, const unsigned int polyorder, const unsigned derive = 0, const double delta = 1
46);
47
48}; // namespace sablib
49
50#endif // __SABLIB_SAVITZKY_GOLAY_H__
const std::vector< double > SavitzkyGolay(const std::vector< double > &y, const unsigned int n, const unsigned int polyorder, const unsigned derive, const double delta)
Performs smoothing (and differentiation) using a Savitzky-Golay filter.
const std::vector< double > SavitzkyGolayCoefficients(const unsigned int n, const unsigned int polyorder, const unsigned derive, const double delta)
Calculates the coefficients for a Savitzky-Golay filter.