37 #ifndef _vpStatisticalTestAbstract_h_
38 #define _vpStatisticalTestAbstract_h_
45 #include <visp3/core/vpConfig.h>
66 MEAN_DRIFT_DOWNWARD = 1,
67 MEAN_DRIFT_UPWARD = 2,
70 MEAN_DRIFT_UNKNOWN = MEAN_DRIFT_COUNT
79 static std::string vpMeanDriftTypeToString(
const vpMeanDriftType &type);
87 static vpMeanDriftType vpMeanDriftTypeFromString(
const std::string &name);
97 static std::string getAvailableMeanDriftType(
const std::string &prefix =
"<",
const std::string &sep =
" , ",
98 const std::string &suffix =
">");
105 static void print(
const vpMeanDriftType &type);
145 virtual bool updateStatistics(
const float &signal);
175 inline void getLimits(
float &limitDown,
float &limitUp)
const
177 limitDown = m_limitDown;
222 m_stdevmin = stdevmin;
231 void setNbSamplesForStat(
const unsigned int &nbSamples);
242 vpMeanDriftType testDownUpwardMeanDrift(
const float &signal);
253 vpMeanDriftType testDownwardMeanDrift(
const float &signal);
264 vpMeanDriftType testUpwardMeanDrift(
const float &signal);
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 getLimits(float &limitDown, float &limitUp) const
Get the upper and lower limits of the test signal.
virtual vpMeanDriftType detectUpwardMeanDrift()=0
Detects if a upward mean drift occurred.
void setMinStdev(const float &stdevmin)
Set the minimum value of the standard deviation that is expected. The computed standard deviation can...
virtual void updateTestSignals(const float &signal)=0
Update the test signals.
bool m_areStatisticsComputed
float getMean() const
Get the mean used as reference.
unsigned int m_nbSamplesForStatistics
float getStdev() const
Get the standard deviation used as reference.
virtual vpMeanDriftType detectDownwardMeanDrift()=0
Detects if a downward mean drift occurred.