|
Bsoft
2.1.0
Bernard's software package
|
Header file moving average calculations. More...
Go to the source code of this file.
Functions | |
| double * | moving_average (long number, double *x, long window) |
| Calculates a moving average over an array of data. More... | |
| Complex< float > * | moving_average_complex (long number, Complex< float > *x, long window) |
| Calculates a moving average over an array of complex data. More... | |
| vector< double > | moving_polynomial (long order, long number, double *x, long window) |
| Calculates a moving polynomial fit over an array of data. More... | |
Header file moving average calculations.
Definition in file moving_average.h.
| double* moving_average | ( | long | number, |
| double * | x, | ||
| long | window | ||
| ) |
Calculates a moving average over an array of data.
| number | number of values in the array. |
| *x | the array. |
| window | sliding window length. |
All data points within a sliding window are averaged. The window moves over the ends of the array and averages only the available points. A new array is allocated and the moving averages returned.
Definition at line 28 of file moving_average.cpp.
Calculates a moving average over an array of complex data.
| number | number of values in the array. |
| *x | the array. |
| window | sliding window length. |
All data points within a sliding window are averaged. The window moves over the ends of the array and averages only the available points. A new array is allocated and the moving averages returned in it.
Definition at line 75 of file moving_average.cpp.
| vector<double> moving_polynomial | ( | long | order, |
| long | number, | ||
| double * | x, | ||
| long | window | ||
| ) |
Calculates a moving polynomial fit over an array of data.
| order | polynomial order. |
| number | number of values in the array. |
| *x | the array. |
| window | sliding window length. |
All data points within a sliding window are fit to a polynomial. The window moves over the ends of the array and fits only the available points. A new array is allocated and the moving polynomial fit values returned.
Definition at line 122 of file moving_average.cpp.