![]() |
Bsoft 2.1.4
Bernard's software package
|
Functions for moving average calculations. More...
Functions | |
vector< double > | moving_average (long number, double *x, long window) |
Calculates a moving average over an array of data. More... | |
vector< double > | moving_average (vector< double > &x, long window) |
Calculates a moving average over an array of data. More... | |
vector< Complex< float > > | moving_average_complex (vector< 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... | |
vector< double > | moving_polynomial (long order, vector< double > &x, long window) |
Calculates a moving polynomial fit over an array of data. More... | |
vector< double > | moving_gradient (vector< double > &x, long window) |
Calculates a moving fit of the local gradient in an array of data. More... | |
vector< double > | moving_curvature (vector< double > &x, long window) |
Calculates a moving fit of the local curvature in an array of data. More... | |
Variables | |
int | verbose |
Functions for moving average calculations.
vector< 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.
vector< double > moving_average | ( | vector< double > & | x, |
long | window | ||
) |
Calculates a moving average over an array of data.
&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.
Calculates a moving average over an array of complex data.
&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.
vector< double > moving_curvature | ( | vector< double > & | x, |
long | window | ||
) |
Calculates a moving fit of the local curvature in an array of data.
&x | the array. |
window | sliding window length. |
All data points within a sliding window are fit to a third-order polynomial. The window moves over the ends of the array and fits only the available points.
vector< double > moving_gradient | ( | vector< double > & | x, |
long | window | ||
) |
Calculates a moving fit of the local gradient in an array of data.
&x | the array. |
window | sliding window length. |
All data points within a sliding window are fit to a line. The window moves over the ends of the array and fits only the available points.
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.
vector< double > moving_polynomial | ( | long | order, |
vector< double > & | x, | ||
long | window | ||
) |
Calculates a moving polynomial fit over an array of data.
order | polynomial order. |
&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.
|
extern |