39 #include <visp3/core/vpStatisticalTestEWMA.h>
103 unsigned int nbRequiredSamples =
static_cast<unsigned int>(std::ceil(3.f /
m_alpha));
114 unsigned int nbRequiredSamples =
static_cast<unsigned int>(std::ceil(3.f /
m_alpha));
Base class for methods detecting the drift of the mean of a process.
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
virtual bool updateStatistics(const float &signal)
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
void setNbSamplesForStat(const unsigned int &nbSamples)
Set the number of samples required to compute the mean and standard deviation of the signal and alloc...
bool m_areStatisticsComputed
vpStatisticalTestEWMA(const float &alpha=0.1f)
Construct a new vpStatisticalTestEWMA object.
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.
virtual bool updateStatistics(const float &signal) VP_OVERRIDE
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
virtual void computeDeltaAndLimits()
Compute the upper and lower limits of the test signal.
void setAlpha(const float &alpha)
Set the forgetting factor.
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if an upward mean drift occurred on the mean.
virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE
Detects if a downward mean drift occurred.