|
void | PushEntry (StorageType value) |
| Push a new entry into the window. If the window is full, the oldest value will be removed.
|
|
AverageType | CalculateAverage () const |
| Calculates the average value for the window.
|
|
StorageType | GetTotal () const |
| Gets the running total of the values in the window.
|
|
StorageType | GetMinimum () const |
| Returns the smallest value that was recorded.
|
|
StorageType | GetMaximum () const |
| Returns the largest value that was recorded.
|
|
size_t | GetNumRecorded () const |
| Returns the total number of entries that have been passed in. This is not the total number of entries that are stored however.
|
|
template<typename StorageType, typename AverageType, size_t WindowSize>
class AZ::IO::AverageWindow< StorageType, AverageType, WindowSize >
AverageWindow keeps track of the average of values in a sliding window. @StorageType The type of the value in the sliding window. Need to be a number of a AZStd::chrono::duration. @AverageType The type CalculateAverage will return. StorageType needs to be able to be converted to AverageType. @WindowSize The maximum number of entries kept in the window.