![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
A generic class to handle a probability distribution. More...
#include <GenericDistribution.h>

Public Types | |
| using | ScalarContainer = std::vector< ScalarType > |
| Scalar values container. More... | |
Public Member Functions | |
| GenericDistribution () | |
| Default constructor. More... | |
| virtual | ~GenericDistribution ()=default |
| Default destructor. More... | |
| virtual const char * | getName () const =0 |
| Returns distribution name. More... | |
| virtual bool | isValid () const |
| Indicates if the distribution parameters are valid. More... | |
| virtual bool | computeParameters (const ScalarContainer &values)=0 |
| Computes the distribution parameters from a set of values. More... | |
| virtual double | computeP (ScalarType x) const =0 |
| Computes the probability of x. More... | |
| virtual double | computePfromZero (ScalarType x) const =0 |
| Computes the cumulative probability between 0 and x. More... | |
| virtual double | computeP (ScalarType x1, ScalarType x2) const =0 |
| Computes the cumulative probability between x1 and x2. More... | |
| virtual double | computeChi2Dist (const GenericCloud *Yk, unsigned numberOfClasses, int *histo=nullptr)=0 |
| Computes the Chi2 distance (related to the Chi2 Test) More... | |
Protected Member Functions | |
| void | setValid (bool state) |
| Sets distribution current validity. More... | |
Protected Attributes | |
| bool | m_isValid |
| Whether the distribution is in a valid state or not. More... | |
A generic class to handle a probability distribution.
Custom parametric distributions can be implemented through this interface and used for filtering data (see StatisticalTestingTools).
Definition at line 25 of file GenericDistribution.h.
| using cloudViewer::GenericDistribution::ScalarContainer = std::vector<ScalarType> |
Scalar values container.
Definition at line 46 of file GenericDistribution.h.
|
inline |
Default constructor.
Definition at line 28 of file GenericDistribution.h.
|
virtualdefault |
Default destructor.
|
pure virtual |
Computes the Chi2 distance (related to the Chi2 Test)
Computes the Chi2 distance from a group of point, accordingly to a certain number of classes (see Chi2 test theory for more information). The result of projecting each point (or more precisely each scalar value associated to each point) in the different classes can be stored in an array (of the same size as the number of classes). To do so, such an array (already allocated in memory) should be passed as an argument. Warning: be sure to activate an OUTPUT scalar field on the input cloud
| Yk | a group of points |
| numberOfClasses | the number of classes for the Chi2 Test |
| histo | an array to store the values projection result (optional) |
Implemented in cloudViewer::NormalDistribution, and cloudViewer::WeibullDistribution.
Referenced by define_GenericDistribution().
|
pure virtual |
Computes the probability of x.
| x | the variable |
Implemented in cloudViewer::WeibullDistribution, and cloudViewer::NormalDistribution.
Referenced by define_GenericDistribution().
|
pure virtual |
Computes the cumulative probability between x1 and x2.
x1 should be lower than x2
| x1 | the lower boundary |
| x2 | the upper boundary |
Implemented in cloudViewer::WeibullDistribution, and cloudViewer::NormalDistribution.
|
pure virtual |
Computes the distribution parameters from a set of values.
| values | a set of scalar values |
Implemented in cloudViewer::WeibullDistribution, and cloudViewer::NormalDistribution.
Referenced by ccEntityAction::computeStatParams(), and define_GenericDistribution().
|
pure virtual |
Computes the cumulative probability between 0 and x.
| x | the upper boundary |
Implemented in cloudViewer::WeibullDistribution, and cloudViewer::NormalDistribution.
Referenced by cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), and define_GenericDistribution().
|
pure virtual |
Returns distribution name.
Implemented in cloudViewer::WeibullDistribution, and cloudViewer::NormalDistribution.
Referenced by ccEntityAction::computeStatParams(), define_GenericDistribution(), CommandStatTest::process(), ccEntityAction::statisticalTest(), and cloudViewer::StatisticalTestingTools::testCloudWithStatisticalModel().
|
inlinevirtual |
Indicates if the distribution parameters are valid.
This function is related to 'computeParameters()'. If the parameters computation failed, then the parameters will be marked as 'invalid'. In this case, the dsitribution should'nt be used (most of the methods won't work anyway).
Definition at line 43 of file GenericDistribution.h.
Referenced by cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), cloudViewer::WeibullDistribution::computeSkewness(), define_GenericDistribution(), cloudViewer::WeibullDistribution::getOtherParameters(), cloudViewer::NormalDistribution::getParameters(), cloudViewer::WeibullDistribution::getParameters(), cloudViewer::ICPRegistrationTools::Register(), cloudViewer::NormalDistribution::setChi2ClassesPositions(), cloudViewer::WeibullDistribution::setChi2ClassesPositions(), cloudViewer::NormalDistribution::setParameters(), cloudViewer::WeibullDistribution::setParameters(), and cloudViewer::StatisticalTestingTools::testCloudWithStatisticalModel().
|
inlineprotected |
Sets distribution current validity.
Definition at line 93 of file GenericDistribution.h.
Referenced by cloudViewer::NormalDistribution::computeParameters(), cloudViewer::WeibullDistribution::computeParameters(), cloudViewer::NormalDistribution::setParameters(), cloudViewer::WeibullDistribution::setParameters(), and cloudViewer::WeibullDistribution::setValueShift().
|
protected |
Whether the distribution is in a valid state or not.
Definition at line 96 of file GenericDistribution.h.