14const std::vector<double>
MovingAverage(
const std::vector<double> & y,
const unsigned int n)
16 Eigen::VectorXd yy = Eigen::VectorXd::Map(y.data(), y.size());
20 std::vector<double> result_y(result.size());
21 Eigen::VectorXd::Map(result_y.data(), result_y.size()) = result;
31 Eigen::VectorXd yy = Eigen::VectorXd::Map(y.data(), y.size());
32 Eigen::VectorXd ww = Eigen::VectorXd::Map(w.data(), w.size());
36 std::vector<double> result_y(result.size());
37 Eigen::VectorXd::Map(result_y.data(), result_y.size()) = result;
const std::vector< double > WeightedMovingAverage(const std::vector< double > &y, const std::vector< double > &w)
Calculates the weighted moving average of the input signal (std::vector<double> version).
const std::vector< double > MovingAverage(const std::vector< double > &y, const unsigned int n)
Calculates the simple moving average of the input signal (std::vector<double> version).
Smoothing using simple/weighted moving average.