Class SlidingWindow
-
template<typename NT>
class SlidingWindow A sliding window, which allows to get the relative error of approximations
- Template Parameters:
NT – Numeric type
Public Functions
-
inline SlidingWindow(int windowSize)
Constructor
- Parameters:
windowSize – [in] The size of the window
-
inline void push(NT approximation)
Adds an approximation in the window
- Parameters:
approximation – [in] The new approximation
-
inline double getRelativeError()
- Returns:
The relative error between the youngest and oldest approximations