Skip to main content

Moving Average+ Methods

The MovingAveragePlus class abstracts the implementation of a circular array in order to calculate the arithmetic average of its members. Because it is a circular array, the next input will replace the oldest element (represented by the first index), so it is also possible to call it a FIFO queue.