#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 Attributes | |
std::array< std::atomic< int >, N > | m_buffer |
std::atomic< int > | m_curr |
std::atomic< int > | m_mean |
Definition at line 10 of file RunningAverage.h.
|
inlineexplicit |
Definition at line 13 of file RunningAverage.h.
References i, gen::k, and m_buffer.
|
inline |
|
inline |
Definition at line 21 of file RunningAverage.h.
References alignCSCRings::e, gen::k, m_buffer, m_curr, m_mean, and N.
Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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 19 of file RunningAverage.h.
References funct::abs(), m_buffer, mean(), and N.
Referenced by HitTripletGenerator::run(), MultiHitGenerator::run(), and HitPairGenerator::run().
|
private |
Definition at line 32 of file RunningAverage.h.
Referenced by RunningAverage(), update(), and upper().
|
private |
Definition at line 34 of file RunningAverage.h.
Referenced by update().
|
private |
Definition at line 33 of file RunningAverage.h.