|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Sliding window of a discrete-time input signal. More...
#include <GREM/core/statistics.hpp>
Classes | |
| struct | Statistics |
| Statistics of the sliding window. More... | |
Public Member Functions | |
| void | clear () noexcept |
| Clear the sliding window of all samples. | |
| void | update (T newSample) noexcept |
| Push a new sample into the sliding window, popping the oldest sample first if the window is at its maximum capacity. | |
| Statistics | getStatistics () const noexcept |
| Calculate the statistics of the current samples in the sliding window. | |
| auto | getSamples () const noexcept |
| Get the samples in the sliding window. | |
Sliding window of a discrete-time input signal.
| T | signal value type. Must be a type that behaves like a number. |
| N | number of samples in the sliding window. Must be positive. |
|
inlinenoexcept |
Clear the sliding window of all samples.
|
inlinenoexcept |
Push a new sample into the sliding window, popping the oldest sample first if the window is at its maximum capacity.
| newSample | new sample to add. |
|
inlinenodiscardnoexcept |
Calculate the statistics of the current samples in the sliding window.
|
inlinenodiscardnoexcept |
Get the samples in the sliding window.