40 #include <visp3/core/vpStatisticalTestHinkley.h>
41 #include <visp3/core/vpMath.h>
57 , m_computeDeltaAndAlpha(false)
66 , m_dmin2(delta_val / 2.f)
72 , m_computeDeltaAndAlpha(false)
76 init(alpha, delta_val, nbSamplesForInit);
82 init(h, k, computeAlphaDeltaFromStdev, nbSamplesForInit);
88 init(h, k, mean, stdev);
127 if (!computeAlphaDeltaFromStdev) {
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
static Type maximum(const Type &a, const Type &b)
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
void setAlpha(const float &alpha)
The threshold indicating that a mean drift occurs.
virtual ~vpStatisticalTestHinkley()
Destroy the vpStatisticalTestHinkley object.
virtual vpMeanDriftType detectDownwardMeanDrift() override
Detects if a downward mean drift occurred.
virtual void computeAlphaDelta()
Compute and from the standard deviation of the signal.
void setDelta(const float &delta)
Set the drift minimal magnitude that we want to detect.
void computeTk(double signal)
Compute .
void computeMk()
Compute , the maximum value of .
void computeNk()
Compute , the minimum value of .
virtual void updateTestSignals(const float &signal) override
Update the test signals.
void computeSk(double signal)
Compute .
virtual vpMeanDriftType detectUpwardMeanDrift() override
Detects if an upward mean drift occured on the mean.
void init()
Initialise the Hinkley's test by setting the mean signal value to zero as well as .
void computeMean(double signal)
Compute the mean value of the signal. The mean value must be computed before the mean drift is estim...
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...
vpStatisticalTestHinkley()
Construct a new vpStatisticalTestHinkley object. Call init() to initialise the Hinkley's test and set...
bool m_computeDeltaAndAlpha