chrono::utils::ChMovingAverage Class Reference

Description

Moving average filter for smoothing a data array.

#include <ChFilters.h>

Public Member Functions

 ChMovingAverage (const std::valarray< double > &data, int n)
 Construct a moving average filter (centered). More...
 
const std::valarray< double > & Get () const
 Return the filtered output.
 
double Get (int i) const
 Return the specified component of the filtered output.
 

Constructor & Destructor Documentation

◆ ChMovingAverage()

chrono::utils::ChMovingAverage::ChMovingAverage ( const std::valarray< double > &  data,
int  n 
)

Construct a moving average filter (centered).

The average is calculated over 2*n+1 points

Parameters
datainput data
nfilter half-span

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/utils/ChFilters.h
  • /builds/uwsbel/chrono/src/chrono/utils/ChFilters.cpp