37 #ifndef _vpStatisticalTestHinkley_h_
38 #define _vpStatisticalTestHinkley_h_
40 #include <visp3/core/vpConfig.h>
42 #include <visp3/core/vpStatisticalTestAbstract.h>
104 virtual void computeAlphaDelta();
112 void computeMean(
double signal);
119 void computeSk(
double signal);
131 void computeTk(
double signal);
143 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
156 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
168 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
179 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
216 vpStatisticalTestHinkley(
const float &h,
const float &k,
const bool &computeAlphaDeltaFromStdev,
const unsigned int &nbSamplesForInit = 30);
246 inline float getSk()
const {
return m_Sk; }
253 inline float getMk()
const {
return m_Mk; }
261 inline float getTk()
const {
return m_Tk; }
268 inline float getNk()
const {
return m_Nk; }
284 void init(
const float &alpha,
const float &delta,
const unsigned int &nbSamplesForInit);
295 void init(
const float &h,
const float &k,
const bool &computeAlphaDeltaFromStdev,
const unsigned int &nbSamplesForInit);
305 void init(
const float &alpha,
const float &delta,
const float &mean);
316 void init(
const float &h,
const float &k,
const float &mean,
const float &stdev);
323 void setDelta(
const float &delta);
330 void setAlpha(
const float &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.
virtual vpMeanDriftType detectUpwardMeanDrift()=0
Detects if a upward mean drift 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...
virtual void updateTestSignals(const float &signal)=0
Update the test signals.
virtual vpMeanDriftType detectDownwardMeanDrift()=0
Detects if a downward mean drift occurred.
This class implements the Hinkley's cumulative sum test.
float getAlpha() const
Get the threshold indicating that a mean drift occurs.
float getNk() const
Get the minimum of the test signal for upward mean drift .
float getTk() const
Get the test signal for upward mean drift..
float getSk() const
Get the test signal for downward mean drift.
bool m_computeDeltaAndAlpha
float getMk() const
Get the maximum of the test signal for downward mean drift .