AGX Dynamics 2.41.1.2
Loading...
Searching...
No Matches
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 update (agx::Real observation)
 Updates the statistic given the current observation and returns the current value of this statistic.
 
- Public Member Functions inherited from agxUtil::ExponentialMovingAverageStatistic
 ExponentialMovingAverageStatistic (agx::Real smoothFactor, agx::Real initialObservation=0)
 
virtual ~ExponentialMovingAverageStatistic ()
 
virtual agx::Real get () const
 
agx::Real getSmoothFactor () const
 
void set (agx::Real val)
 Set the raw value of the statistic scalar.
 
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.
 
- Public Member Functions inherited from agxUtil::Statistic
virtual ~Statistic ()
 
virtual agx::Real get () const =0
 
virtual agx::Real update (agx::Real observation)=0
 Updates the statistic given the current observation and returns the current value of this statistic.
 

Static Public Member Functions

static StatisticHandleRef make_statistic (agx::Real maxSmoothingFactor, agx::Real initialObservation=0)
 
- Static Public Member Functions inherited from agxUtil::ExponentialMovingAverageStatistic
static StatisticHandleRef make_statistic (agx::Real maxSmoothingFactor, agx::Real initialObservation=0)
 

Additional Inherited Members

- Protected Attributes inherited from agxUtil::ExponentialMovingAverageStatistic
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

◆ VariableSmoothFactorEMAStatistic()

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.

◆ ~VariableSmoothFactorEMAStatistic()

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

Definition at line 167 of file Statistic.h.

Member Function Documentation

◆ make_statistic()

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

Definition at line 169 of file Statistic.h.

◆ update()

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().


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