Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::IO::AverageWindow< StorageType, AverageType, WindowSize > Class Template Reference

#include <Statistics.h>

Public Member Functions

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.
 

Static Public Attributes

static const size_t s_windowSize = WindowSize
 

Detailed Description

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.


The documentation for this class was generated from the following file: