- Declared in:
- MovingAverage.h
This is a general purpose class for keeping averages. It is called MovingAverage because it was originally intended to keep a moving average from a stream of inputs. The width of the moving average can be any desired integral value.
More generally, this class also can supply the ordinary average, as well as an exponentially weighted moving average of the inputs.
Insert a value into the number stream that is contained in this object
Free dynamically allocated memory when this object is destroyed
Return the average value of all inputs
Return the exponentially weighted moving average
Return the value that was inputted i periods in the past
Return the moving average value
Return the number of values that have been inputted
initialize the moving average object with a width of w
Initialize the moving average with a width of interval w and an initial value of val
Save the values of all instance variables for serialization purposes
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.