#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 progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), HitPairGenerator::clear(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), HitTripletGenerator::run(), MultiHitGenerator::run(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
|
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.