Momentum Scripting v1
Loading...
Searching...
No Matches
v1::Statistic Class Referenceabstract

#include <Statistic.h>

Public Member Functions

virtual ~Statistic ()
 
virtual double get () const =0
 
virtual double update (double observation)=0
 

Detailed Description

Abstract base class for handling smoothing of data points.

Constructor & Destructor Documentation

◆ ~Statistic()

virtual v1::Statistic::~Statistic ( )
virtual

Member Function Documentation

◆ get()

virtual double v1::Statistic::get ( ) const
pure virtual
Returns
the current value of this statistic

Implemented in v1::ExponentialMovingAverageStatistic, and v1::MedianStatistic.

◆ update()

virtual double v1::Statistic::update ( double  observation)
pure virtual

Updates the statistic given the current observation and returns the current value of this statistic.

Parameters
observation- the current observation
Returns
the current value of this statistic

Implemented in v1::ExponentialMovingAverageStatistic, and v1::MedianStatistic.