sdurw_algorithms module

class sdurw_algorithms.sdurw_algorithms.MovingAverage(N)

Bases: object

calculates the moving average over a continues input of samples.

A circular buffer is maintained so that the last N samples can be inspected. the sum of values in this buffer is also maintained such that the average can be efficiently calculated.


adds a sample :type sample: float :param sample:


returns the current average :rtype: float :return:

property thisown

The membership flag