![]() |
sablib
|
Smoothing using simple/weighted moving average. More...
Go to the source code of this file.
Functions | |
| const std::vector< double > | sablib::WeightedMovingAverage (const std::vector< double > &y, const std::vector< double > &w) |
| Calculates the weighted moving average of the input signal (std::vector<double> version). | |
| template<typename Derived> | |
| const Derived::PlainObject | sablib::WeightedMovingAverage (const Eigen::MatrixBase< Derived > &y, const Eigen::MatrixBase< Derived > &w) |
| Calculates the weighted moving average of the input signal. | |
| const std::vector< double > | sablib::MovingAverage (const std::vector< double > &y, const unsigned int n) |
| Calculates the simple moving average of the input signal (std::vector<double> version). | |
| template<typename Derived> | |
| const Derived::PlainObject | sablib::MovingAverage (const Eigen::MatrixBase< Derived > &y, const unsigned int n) |
| Calculates the simple moving average of the input signal. | |
Smoothing using simple/weighted moving average.
Definition in file moving_average.h.
| const Derived::PlainObject sablib::MovingAverage | ( | const Eigen::MatrixBase< Derived > & | y, |
| const unsigned int | n ) |
Calculates the simple moving average of the input signal.
| y | The data to be averaged. |
| n | Half-width of the moving average window (calculated using 2 * n + 1 points). |
| std::invalid_argument | If n is zero. |
Definition at line 87 of file moving_average.h.
| const std::vector< double > sablib::MovingAverage | ( | const std::vector< double > & | y, |
| const unsigned int | n ) |
Calculates the simple moving average of the input signal (std::vector<double> version).
| y | The data to be averaged. |
| n | Half-width of the moving average window (calculated using 2 * n + 1 points). |
Definition at line 14 of file moving_average.cpp.
| const Derived::PlainObject sablib::WeightedMovingAverage | ( | const Eigen::MatrixBase< Derived > & | y, |
| const Eigen::MatrixBase< Derived > & | w ) |
Calculates the weighted moving average of the input signal.
| y | The data to be averaged. |
| w | Weights. |
| std::invalid_argument | If the length of y or w is zero. |
Definition at line 36 of file moving_average.h.
| const std::vector< double > sablib::WeightedMovingAverage | ( | const std::vector< double > & | y, |
| const std::vector< double > & | w ) |
Calculates the weighted moving average of the input signal (std::vector<double> version).
| y | The data to be averaged. |
| w | Weights. |
Definition at line 29 of file moving_average.cpp.