37 #ifndef _vpStatisticalTestShewhartTest_h_
38 #define _vpStatisticalTestShewhartTest_h_
42 #include <visp3/core/vpConfig.h>
43 #include <visp3/core/vpStatisticalTestSigma.h>
86 static std::string vpWecoRulesAlarmToString(
const vpWecoRulesAlarm &alarm);
88 static const bool CONST_ALL_WECO_ACTIVATED[COUNT_WECO - 1];
89 static const int NB_DATA_SIGNAL = 8;
93 float m_signal[NB_DATA_SIGNAL];
96 bool m_activatedWECOrules[COUNT_WECO - 1];
109 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
122 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
135 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
147 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
158 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
173 vpStatisticalTestShewhart(
const bool &activateWECOrules =
true,
const bool activatedRules[COUNT_WECO - 1] = CONST_ALL_WECO_ACTIVATED,
const unsigned int &nbSamplesForStats = 30);
185 vpStatisticalTestShewhart(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1],
const float &mean,
const float &stdev);
202 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
208 return m_signal[m_idCurrentData];
216 std::vector<float> getSignals()
const;
227 void init(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1] = CONST_ALL_WECO_ACTIVATED,
const unsigned int &nbSamplesForStats = 30);
239 void init(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1],
const float &mean,
const float &stdev);
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
Class that permits a Shewhart's test.
vpWecoRulesAlarm getAlarm() const
Get the alarm raised by the last test due to the WECO's rules.
unsigned int m_nbDataInBuffer
virtual float getSignal() const override
Get the last value of the signal.
Class that permits a simple test comparing the current value to the standard deviation of the signal.
virtual float getSignal() const
Get the last value of the signal.
virtual vpMeanDriftType detectUpwardMeanDrift() override
Detects if an upward mean drift occured on the mean.
virtual vpMeanDriftType detectDownwardMeanDrift() override
Detects if a downward mean drift occured.
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...
virtual void computeLimits()
Compute the upper and lower limits of the test signal.
virtual void updateTestSignals(const float &signal) override
Update the test signals.