/Users/bernard/b20/bsoft/include/moving_average.h(3)

NAME
/Users/bernard/b20/bsoft/include/moving_average.h - Header file moving average calculations.

SYNOPSIS

#include 'Complex.h'
#include 'matrix_linear.h'
#include 'utilities.h'

  Functions
double * moving_average (long number, double *x, long window)
Calculates a moving average over an array of data.
Complex< float > * moving_average_complex (long number, Complex< float > *x, long window)
Calculates a moving average over an array of complex data.
vector< double > moving_polynomial (long order, long number, double *x, long window)
Calculates a moving polynomial fit over an array of data.

Detailed Description

Header file moving average calculations.

Author:
    Bernard Heymann

Date:
    Created: 20000430

    Modified: 20190225

Definition in file moving_average.h.

Function Documentation

  double* moving_average (long number, double * x, long window)

Calculates a moving average over an array of data.

Parameters:
    number number of values in the array.
    *x the array.
    window sliding window length.

Returns:
    double* the moving average array.

    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.

  Complex<float>* moving_average_complex (long number, Complex< float > * x, long window)

Calculates a moving average over an array of complex data.

Parameters:
    number number of values in the array.
    *x the array.
    window sliding window length.

Returns:
    Complex<float>* the moving average complex array.

    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.

Parameters:
    order polynomial order.
    number number of values in the array.
    *x the array.
    window sliding window length.

Returns:
    double* the moving polynomial fit array.

    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.

Author

Generated automatically by Doxygen for Bsoft from the source code.