37 #ifndef _vpStatisticalTestHinkley_h_
38 #define _vpStatisticalTestHinkley_h_
40 #include <visp3/core/vpConfig.h>
42 #include <visp3/core/vpStatisticalTestAbstract.h>
105 virtual void computeAlphaDelta();
113 void computeMean(
double signal);
120 void computeSk(
double signal);
132 void computeTk(
double signal);
144 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
157 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
169 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
180 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
217 vpStatisticalTestHinkley(
const float &h,
const float &k,
const bool &computeAlphaDeltaFromStdev,
const unsigned int &nbSamplesForInit = 30);
247 inline float getSk()
const {
return m_Sk; }
254 inline float getMk()
const {
return m_Mk; }
262 inline float getTk()
const {
return m_Tk; }
269 inline float getNk()
const {
return m_Nk; }
285 void init(
const float &alpha,
const float &delta,
const unsigned int &nbSamplesForInit);
296 void init(
const float &h,
const float &k,
const bool &computeAlphaDeltaFromStdev,
const unsigned int &nbSamplesForInit);
306 void init(
const float &alpha,
const float &delta,
const float &mean);
317 void init(
const float &h,
const float &k,
const float &mean,
const float &stdev);
324 void setDelta(
const float &delta);
331 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 .