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#include "sablib_export.h"
16
17namespace sablib {
18
29SABLIB_EXPORT const std::vector<double> SavitzkyGolayCoefficients(
30 const unsigned int n, const unsigned int polyorder, const unsigned derive = 0, const double delta = 1
31);
32
44SABLIB_EXPORT const std::vector<double> SavitzkyGolay(
45 const std::vector<double> & y,
46 const unsigned int n, const unsigned int polyorder, const unsigned derive = 0, const double delta = 1
47);
48
49}; // namespace sablib
50
51#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.