AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxUtil::VariableSmoothFactorEMAStatistic Class Reference

Variable Smooth Factor Exponential Moving Average statistic. More...

#include <Statistic.h>

+ Inheritance diagram for agxUtil::VariableSmoothFactorEMAStatistic:

Public Member Functions

 VariableSmoothFactorEMAStatistic (agx::Real maxSmoothingFactor, agx::Real initialObservation=0)
 
virtual ~VariableSmoothFactorEMAStatistic ()
 
virtual agx::Real get () const
 
agx::Real getSmoothFactor () const
 
void set (agx::Real val)
 Set the raw value of the statistic scalar. More...
 
void setSmoothFactor (agx::Real smoothFactor)
 
virtual agx::Real update (agx::Real observation)
 Updates the statistic given the current observation and returns the current value of this statistic. More...
 

Static Public Member Functions

static StatisticHandleRef make_statistic (agx::Real maxSmoothingFactor, agx::Real initialObservation=0)
 

Protected Attributes

agx::Real m_s
 
agx::Real m_smoothFactor
 

Detailed Description

Variable Smooth Factor Exponential Moving Average statistic.

During update, this class calculates a suitable smoothing factor to eliminate any sudden peaks in the observations (i.e., the smoothing factor goes to zero).

Definition at line 147 of file Statistic.h.

Constructor & Destructor Documentation

agxUtil::VariableSmoothFactorEMAStatistic::VariableSmoothFactorEMAStatistic ( agx::Real  maxSmoothingFactor,
agx::Real  initialObservation = 0 
)
inline
Parameters
maxSmoothingFactor- the maximum smoothing factor (min smoothing factor is zero)
initialObservation- the initial observation

Definition at line 154 of file Statistic.h.

virtual agxUtil::VariableSmoothFactorEMAStatistic::~VariableSmoothFactorEMAStatistic ( )
inlinevirtual

Definition at line 167 of file Statistic.h.

Member Function Documentation

virtual agx::Real agxUtil::ExponentialMovingAverageStatistic::get ( ) const
inlinevirtualinherited
Returns
the current value of this statistic

Implements agxUtil::Statistic.

Definition at line 116 of file Statistic.h.

agx::Real agxUtil::ExponentialMovingAverageStatistic::getSmoothFactor ( ) const
inlineinherited
Returns
the smoothing factor

Definition at line 121 of file Statistic.h.

static StatisticHandleRef agxUtil::VariableSmoothFactorEMAStatistic::make_statistic ( agx::Real  maxSmoothingFactor,
agx::Real  initialObservation = 0 
)
inlinestatic

Definition at line 169 of file Statistic.h.

void agxUtil::ExponentialMovingAverageStatistic::set ( agx::Real  val)
inlineinherited

Set the raw value of the statistic scalar.

This will be stored without any smoothing. Can be used to initialize the object to a specific value.

Definition at line 114 of file Statistic.h.

void agxUtil::ExponentialMovingAverageStatistic::setSmoothFactor ( agx::Real  smoothFactor)
inlineinherited
Parameters
smoothFactor- the smoothing factor

Definition at line 126 of file Statistic.h.

virtual agx::Real agxUtil::VariableSmoothFactorEMAStatistic::update ( agx::Real  observation)
inlinevirtual

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

Reimplemented from agxUtil::ExponentialMovingAverageStatistic.

Definition at line 157 of file Statistic.h.

References agx::clamp().

Member Data Documentation

agx::Real agxUtil::ExponentialMovingAverageStatistic::m_s
protectedinherited

Definition at line 139 of file Statistic.h.

agx::Real agxUtil::ExponentialMovingAverageStatistic::m_smoothFactor
protectedinherited

Definition at line 138 of file Statistic.h.


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