![]() |
Ark Server API (ASA) - Wiki
|
#include <MovingWindowAverageFast.h>
Public Member Functions | |
| FMovingWindowAverageFast () | |
| void | PushValue (T Value) |
| T | GetAverage () const |
Private Attributes | |
| TStaticArray< T, ArraySize > | ValuesArray |
| T | TotalValues |
| T | AverageValue |
| int32 | RemoveNextIdx |
| int32 | NumValuesUsed |
This class calculates a moving window average. Its designed to be used with floats or doubles and keeps track of the average with every value pushed so is ideal when there is a one to one or one to many relationship between calls to PushValue() and GetMovingWindowAverage() respectively.
Definition at line 12 of file MovingWindowAverageFast.h.
|
inline |
Definition at line 15 of file MovingWindowAverageFast.h.
|
inline |
Definition at line 47 of file MovingWindowAverageFast.h.
|
inline |
Definition at line 24 of file MovingWindowAverageFast.h.
|
private |
Definition at line 56 of file MovingWindowAverageFast.h.
|
private |
Definition at line 60 of file MovingWindowAverageFast.h.
|
private |
The array Index of the next item to remove when the moving window is full
Definition at line 59 of file MovingWindowAverageFast.h.
|
private |
Definition at line 55 of file MovingWindowAverageFast.h.
|
private |
Definition at line 53 of file MovingWindowAverageFast.h.