36#ifndef VP_STATISTICAL_TEST_SHEWHART_H
37#define VP_STATISTICAL_TEST_SHEWHART_H
41#include <visp3/core/vpConfig.h>
42#include <visp3/core/vpStatisticalTestSigma.h>
93 static std::string vpWecoRulesAlarmToString(
const vpWecoRulesAlarm &alarm);
95#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
175 vpStatisticalTestShewhart(const
bool &activateWECOrules, const std::vector<
bool> &activatedRules, const
float &mean, const
float &stdev);
192#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
206 std::vector<float> getSignals()
const;
217 void init(
const bool &activateWECOrules,
const std::vector<bool> &activatedRules = CONST_ALL_WECO_ACTIVATED,
const unsigned int &nbSamplesForStats = 30);
229 void init(
const bool &activateWECOrules,
const std::vector<bool> &activatedRules,
const float &mean,
const float &stdev);
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
vpStatisticalTestShewhart(const bool &activateWECOrules=true, const std::vector< bool > &activatedRules=CONST_ALL_WECO_ACTIVATED, const unsigned int &nbSamplesForStats=30)
Construct a new vpStatisticalTestShewhart object.
virtual bool updateStatistics(const float &signal) VP_OVERRIDE
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
static const unsigned int NB_DATA_SIGNAL
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if an upward mean drift occurred on the mean.
static VP_ATTRIBUTE_NO_DESTROY const std::vector< bool > CONST_ALL_WECO_ACTIVATED
virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE
Detects if a downward mean drift occurred.
vpWecoRulesAlarm getAlarm() const
Get the alarm raised by the last test due to the WECO's rules.
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.
std::vector< bool > m_activatedWECOrules
unsigned int m_nbDataInBuffer
virtual float getSignal() const override
Get the last value of the signal.
unsigned int m_idCurrentData
float m_signal_vec[NB_DATA_SIGNAL]
vpStatisticalTestSigma(const float &h=3.f, const unsigned int &nbSamplesForStats=30)
Construct a new vpStatisticalTestSigma object.
virtual float getSignal() const
Get the last value of the signal.
virtual void computeLimits()
Compute the upper and lower limits of the test signal.