Etterna 0.74.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CalcMovingWindow< T > Struct Template Reference

#include <CalcWindow.h>

Public Member Functions

void operator() (const T &new_val)
 
auto operator[] (const int &pos) const -> T
 index moving window like an array
 
auto get_now () const -> T
 get most recent value in moving window
 
auto get_last () const -> T
 get oldest value in moving window
 
auto get_total_for_window (const int &window) const -> T
 get the sum for the moving window up to a given size
 
auto get_max_for_window (const int &window) const -> T
 get the max for the moving window up to a given size
 
auto get_min_for_window (const int &window) const -> T
 get the min for the moving window up to a given size
 
auto get_mean_of_window (const int &window) const -> float
 get the mean for the moving window up to a given size
 
auto get_total_for_windowf (const int &window) const -> float
 
auto get_cv_of_window (const int &window) const -> float
 get the coefficient of variance of the moving window up to a given size
 
auto ccacc_timing_check (const float &factor, const float &threshold) -> bool
 perform cv check internally
 
auto acca_timing_check (const float &factor, const float &threshold) -> bool
 perform cv check internally
 
auto roll_timing_check (const float &factor, const float &threshold) -> bool
 perform cv check internally
 
void zero ()
 set everything to zero
 
void fill (const T &val)
 

Detailed Description

template<typename T>
struct CalcMovingWindow< T >

custom moving window container that can do basic statistical operations on a dynamic window

Member Function Documentation

◆ get_total_for_windowf()

template<typename T >
auto CalcMovingWindow< T >::get_total_for_windowf ( const int &  window) const -> float
inline

get the total for the moving window up to a given size specific for returning a float

◆ operator()()

template<typename T >
void CalcMovingWindow< T >::operator() ( const T &  new_val)
inline

ok there's actually a good reason for indexing this way because it's more intuitive since we are scanning row by row the earliest values in the window are the oldest


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