Visual Servoing Platform  version 3.6.1 under development (2024-05-05)
TutorialMeanDrift Namespace Reference

Classes

struct  ParametersForAlgo
 

Typedefs

typedef enum TutorialMeanDrift::TypeTest TypeTest
 
typedef struct TutorialMeanDrift::ParametersForAlgo ParametersForAlgo
 

Enumerations

enum  TypeTest {
  HINLKEY_TYPE_TEST = 0 , EWMA_TYPE_TEST = 1 , MEAN_ADJUSTED_CUSUM_TYPE_TEST = 2 , SHEWHART_TYPE_TEST = 3 ,
  SIGMA_TYPE_TEST = 4 , COUNT_TYPE_TEST = 5 , UNKOWN_TYPE_TEST = COUNT_TYPE_TEST
}
 

Functions

std::string typeTestToString (const TypeTest &type)
 
TypeTest typeTestFromString (const std::string &name)
 
std::string getAvailableTypeTest (const std::string &prefix="<", const std::string &sep=" , ", const std::string &suffix=">")
 
template<typename T >
std::string numberToString (const T &number)
 
std::string boolToString (const bool &boolean)
 
std::string wecoRulesToString (const bool rules[vpStatisticalTestShewhart::COUNT_WECO - 1], const std::string &prefix="[", const std::string &suffix="]", const std::string &sep=" , ")
 
void vectorOfStringToMeanDriftTypeArray (const std::vector< std::string > &names, bool array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT])
 
std::vector< std::string > meanDriftArrayToVectorOfString (const bool array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT])
 
std::string meanDriftArrayToString (const bool array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT], const std::string &prefix="[", const std::string &sep=" , ", const std::string &suffix="]")
 
unsigned int meanDriftArrayToNbActivated (const bool array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT])
 

Variables

const bool CONST_ALL_ALARM_OFF [vpStatisticalTestAbstract::MEAN_DRIFT_COUNT] = { false, false, false, false }
 
const bool CONST_ALL_ALARM_ON [vpStatisticalTestAbstract::MEAN_DRIFT_COUNT] = { true, true, true, true }
 

Typedef Documentation

◆ ParametersForAlgo

[Structure_Parameters]

Structure that contains the parameters of the different algorithms.

Examples
tutorial-meandrift.cpp.

◆ TypeTest

[Enum_For_Test_Choice]

Enumeration that permits to choose which process test to use.

Enumeration Type Documentation

◆ TypeTest

[Enum_For_Test_Choice]

Enumeration that permits to choose which process test to use.

Enumerator
HINLKEY_TYPE_TEST 

Use Hinkley's test.

EWMA_TYPE_TEST 

Use Exponentially Weighted Moving Average to perform the tests.

MEAN_ADJUSTED_CUSUM_TYPE_TEST 

Use mean adjusted Cumulative Sum to perform the tests.

SHEWHART_TYPE_TEST 

Shewhart's test.

SIGMA_TYPE_TEST 

Simple test based on the comparisong with the standard deviation.

COUNT_TYPE_TEST 

Number of different aavailable methods.

UNKOWN_TYPE_TEST 

Unknown method.

Examples
tutorial-meandrift.cpp.

Definition at line 54 of file tutorial-meandrift.cpp.

Function Documentation

◆ boolToString()

std::string TutorialMeanDrift::boolToString ( const bool &  boolean)

Cast a boolean into a string.

Parameters
[in]booleanThe boolean to cast.
Returns
std::string The corresponding string.
Examples
tutorial-meandrift.cpp.

Definition at line 165 of file tutorial-meandrift.cpp.

◆ getAvailableTypeTest()

std::string TutorialMeanDrift::getAvailableTypeTest ( const std::string &  prefix = "<",
const std::string &  sep = " , ",
const std::string &  suffix = ">" 
)

Get the list of available TypeTest objects that are handled.

Parameters
[in]prefixThe prefix that should be placed before the list.
[in]sepThe separator between each element of the list.
[in]suffixThe suffix that should terminate the list.
Returns
std::string The list of handled type of process tests, presented as a string.
Examples
tutorial-meandrift.cpp.

Definition at line 131 of file tutorial-meandrift.cpp.

References COUNT_TYPE_TEST, and typeTestToString().

◆ meanDriftArrayToNbActivated()

unsigned int TutorialMeanDrift::meanDriftArrayToNbActivated ( const bool  array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT])

Indicate how many alarms are set.

Parameters
[in]arrayThe array of boolean indicating which alarms are set.
Returns
unsigned int The number of alarms that are set.
Examples
tutorial-meandrift.cpp.

Definition at line 295 of file tutorial-meandrift.cpp.

References vpStatisticalTestAbstract::MEAN_DRIFT_COUNT.

Referenced by TutorialMeanDrift::ParametersForAlgo::ParametersForAlgo().

◆ meanDriftArrayToString()

std::string TutorialMeanDrift::meanDriftArrayToString ( const bool  array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT],
const std::string &  prefix = "[",
const std::string &  sep = " , ",
const std::string &  suffix = "]" 
)

Cast an array of boolean (de)activating the mean drift alarms into a single string listing all the alarms.

Parameters
[in]arrayThe array of boolean indicating which alarm are set.
[in]prefixThe returned string prefix.
[in]sepThe returned string separator.
[in]suffixThe returned string suffix.
Returns
std::string The corresponding string listing the names of alarms.
Examples
tutorial-meandrift.cpp.

Definition at line 272 of file tutorial-meandrift.cpp.

References meanDriftArrayToVectorOfString().

◆ meanDriftArrayToVectorOfString()

std::vector<std::string> TutorialMeanDrift::meanDriftArrayToVectorOfString ( const bool  array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT])

Cast an array of boolean (de)activating the mean drift alarms into the corresponding vector of strings.

Parameters
[in]arrayThe array of boolean indicating which alarm are set.
Returns
std::vector<std::string> The corresponding vector of names of alarms.
Examples
tutorial-meandrift.cpp.

Definition at line 248 of file tutorial-meandrift.cpp.

References vpStatisticalTestAbstract::MEAN_DRIFT_COUNT, and vpStatisticalTestAbstract::vpMeanDriftTypeToString().

Referenced by meanDriftArrayToString().

◆ numberToString()

template<typename T >
std::string TutorialMeanDrift::numberToString ( const T &  number)

Cast a number type into a string.

Template Parameters
TType of number.
Parameters
[in]numberThe number to cast.
Returns
std::string The corresponding string.
Examples
tutorial-meandrift.cpp.

Definition at line 152 of file tutorial-meandrift.cpp.

◆ typeTestFromString()

TypeTest TutorialMeanDrift::typeTestFromString ( const std::string &  name)

Permit to cast a string into a TypeTest, to cast a command line argument.

Parameters
[in]nameThe name of the process test the user wants to use.
Returns
TypeTest The corresponding TypeTest object.
Examples
tutorial-meandrift.cpp.

Definition at line 106 of file tutorial-meandrift.cpp.

References COUNT_TYPE_TEST, typeTestToString(), and UNKOWN_TYPE_TEST.

◆ typeTestToString()

std::string TutorialMeanDrift::typeTestToString ( const TypeTest type)

[Enum_For_Test_Choice]

Permit to cast a TypeTest object into a string, for display purpose.

Parameters
[in]typeThe TypeTest object we want to know the name.
Returns
std::string The corresponding name.
Examples
tutorial-meandrift.cpp.

Definition at line 72 of file tutorial-meandrift.cpp.

References EWMA_TYPE_TEST, HINLKEY_TYPE_TEST, MEAN_ADJUSTED_CUSUM_TYPE_TEST, SHEWHART_TYPE_TEST, SIGMA_TYPE_TEST, and UNKOWN_TYPE_TEST.

Referenced by getAvailableTypeTest(), and typeTestFromString().

◆ vectorOfStringToMeanDriftTypeArray()

void TutorialMeanDrift::vectorOfStringToMeanDriftTypeArray ( const std::vector< std::string > &  names,
bool  array[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT] 
)

Cast a vector of string into an array of boolean activating / deactivating the mean drift alarms.

Parameters
[in]namesThe names of the alarms to set.
[out]arrayThe corresponding array of boolean.
Examples
tutorial-meandrift.cpp.

Definition at line 223 of file tutorial-meandrift.cpp.

References CONST_ALL_ALARM_OFF, vpStatisticalTestAbstract::MEAN_DRIFT_BOTH, vpStatisticalTestAbstract::MEAN_DRIFT_COUNT, vpStatisticalTestAbstract::MEAN_DRIFT_DOWNWARD, vpStatisticalTestAbstract::MEAN_DRIFT_UPWARD, and vpStatisticalTestAbstract::vpMeanDriftTypeFromString().

◆ wecoRulesToString()

std::string TutorialMeanDrift::wecoRulesToString ( const bool  rules[vpStatisticalTestShewhart::COUNT_WECO - 1],
const std::string &  prefix = "[",
const std::string &  suffix = "]",
const std::string &  sep = " , " 
)

Write the WECO's rules used in the Shewhart's test in human readable format.

Parameters
[in]rulesThe array indicating which WECO's rules are used.
[in]prefixThe first character(s) delimiting the array in the string.
[in]suffixThe last character(s) delimiting the array in the string.
[in]sepThe separator character(s).
Returns
std::string The corresponding string.
Examples
tutorial-meandrift.cpp.

Definition at line 184 of file tutorial-meandrift.cpp.

References vpStatisticalTestShewhart::COUNT_WECO.

Variable Documentation

◆ CONST_ALL_ALARM_OFF

const bool TutorialMeanDrift::CONST_ALL_ALARM_OFF[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT] = { false, false, false, false }

Array that sets all the types of mean drift to deactivated.

Examples
tutorial-meandrift.cpp.

Definition at line 209 of file tutorial-meandrift.cpp.

Referenced by vectorOfStringToMeanDriftTypeArray().

◆ CONST_ALL_ALARM_ON

const bool TutorialMeanDrift::CONST_ALL_ALARM_ON[vpStatisticalTestAbstract::MEAN_DRIFT_COUNT] = { true, true, true, true }

Array that sets all the types of mean drift to activated.

Examples
tutorial-meandrift.cpp.

Definition at line 214 of file tutorial-meandrift.cpp.

Referenced by TutorialMeanDrift::ParametersForAlgo::ParametersForAlgo().