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
virtual void updateTestSignals(const float &signal) override
Update the test signals.
vpStatisticalTestEWMA(const float &alpha=0.1f)
Construct a new vpStatisticalTestEWMA object.
virtual vpMeanDriftType detectUpwardMeanDrift() override
Detects if an upward mean drift occurred on the mean.
virtual void computeDeltaAndLimits()
Compute the upper and lower limits of the test signal.
virtual bool updateStatistics(const float &signal) override
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
void setAlpha(const float &alpha)
Set the forgetting factor.
virtual vpMeanDriftType detectDownwardMeanDrift() override
Detects if a downward mean drift occurred.