Template Class WindowedAverageBuffer

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class WindowedAverageBuffer : public dai::utility::CircularBuffer<T>

A circular buffer that maintains a running average of its elements.

Template Parameters:

T – The type of elements stored in the buffer (must support addition and division)

Public Functions

inline WindowedAverageBuffer(size_t size, T initialValue = T())
inline virtual void onSwap(T &oldValue, T &newValue) override
inline virtual void onAdd(T &newValue) override
inline T getAverage() const