#include <RunningAverage.h>
Public Member Functions | |
int | mean () const |
RunningAverage (unsigned int k=4) | |
void | update (unsigned int q) |
int | upper () const |
Static Public Attributes | |
static constexpr int | N = 16 |
Private Member Functions | |
friend | int::test::running_average::test () |
Private Attributes | |
std::array< std::atomic< int >, N > | m_buffer |
std::atomic< int > | m_curr |
std::atomic< int > | m_mean |
Definition at line 17 of file RunningAverage.h.
|
inlineexplicit |
Definition at line 23 of file RunningAverage.h.
References i, relval_2017::k, and m_buffer.
|
private |
|
inline |
|
inline |
Definition at line 31 of file RunningAverage.h.
References alignCSCRings::e, relval_2017::k, m_buffer, m_curr, m_mean, and N.
Referenced by HitPairGenerator::clear(), HitTripletGenerator::run(), MultiHitGenerator::run(), and Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().
|
inline |
Definition at line 29 of file RunningAverage.h.
References funct::abs(), m_buffer, mean(), and N.
Referenced by HitTripletGenerator::run(), HitPairGenerator::run(), and MultiHitGenerator::run().
|
private |
Definition at line 42 of file RunningAverage.h.
Referenced by RunningAverage(), update(), and upper().
|
private |
Definition at line 44 of file RunningAverage.h.
Referenced by update().
|
private |
Definition at line 43 of file RunningAverage.h.