![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
The Weibull statistical parametric distribution. More...
#include <WeibullDistribution.h>
Public Member Functions | |
| WeibullDistribution () | |
| WeibullDistribution constructor. More... | |
| WeibullDistribution (ScalarType a, ScalarType b, ScalarType valueShift=0) | |
| WeibullDistribution constructor. More... | |
| bool | getParameters (ScalarType &a, ScalarType &b) const |
| Returns the distribution parameters. More... | |
| bool | getOtherParameters (ScalarType &mu, ScalarType &sigma2) const |
| Returns the normal distribution equivalent parameters. More... | |
| double | computeMode () const |
| Returns the distribution 'mode'. More... | |
| double | computeSkewness () const |
| Returns the distribution 'skewness'. More... | |
| bool | setParameters (ScalarType a, ScalarType b, ScalarType valueShift=0) |
| Sets the distribution parameters. More... | |
| void | setValueShift (ScalarType vs) |
| Sets the distribution value shift. More... | |
| ScalarType | getValueShift () const |
| Returns the distribution value shift. More... | |
| bool | computeParameters (const ScalarContainer &values) override |
| Computes the distribution parameters from a set of values. More... | |
| double | computeP (ScalarType x) const override |
| Computes the probability of x. More... | |
| double | computePfromZero (ScalarType x) const override |
| Computes the cumulative probability between 0 and x. More... | |
| double | computeP (ScalarType x1, ScalarType x2) const override |
| Computes the cumulative probability between x1 and x2. More... | |
| double | computeChi2Dist (const GenericCloud *cloud, unsigned numberOfClasses, int *histo=nullptr) override |
| Computes the Chi2 distance (related to the Chi2 Test) More... | |
| const char * | getName () const override |
| Returns distribution name. More... | |
Public Member Functions inherited from cloudViewer::GenericDistribution | |
| GenericDistribution () | |
| Default constructor. More... | |
| virtual | ~GenericDistribution ()=default |
| Default destructor. More... | |
| virtual bool | isValid () const |
| Indicates if the distribution parameters are valid. More... | |
Protected Member Functions | |
| virtual bool | setChi2ClassesPositions (unsigned numberOfClasses) |
| Compute each Chi2 class limits. More... | |
Protected Member Functions inherited from cloudViewer::GenericDistribution | |
| void | setValid (bool state) |
| Sets distribution current validity. More... | |
Static Protected Member Functions | |
| static double | ComputeG (const ScalarContainer &values, double a, ScalarType valueShift, double valueRange) |
| internal function for parameters evaluation from sample points More... | |
| static double | FindGRoot (const ScalarContainer &values, ScalarType valueShift, double valueRange) |
| internal function for parameters evaluation from sample points More... | |
Protected Attributes | |
| std::vector< ScalarType > | chi2ClassesPositions |
| Chi2 classes limits. More... | |
| bool | parametersDefined |
| Parameters validity. More... | |
| ScalarType | m_a |
| Weibull distribution parameter a (k) More... | |
| ScalarType | m_b |
| Weibull distribution parameter b (lambda) More... | |
| ScalarType | m_valueShift |
| Weibull distribution parameter 'value shift'. More... | |
| ScalarType | m_mu |
| Normal distribution equivalent parameter: mean. More... | |
| ScalarType | m_sigma2 |
| Normal distribution equivalent parameter: variance. More... | |
Protected Attributes inherited from cloudViewer::GenericDistribution | |
| bool | m_isValid |
| Whether the distribution is in a valid state or not. More... | |
Additional Inherited Members | |
Public Types inherited from cloudViewer::GenericDistribution | |
| using | ScalarContainer = std::vector< ScalarType > |
| Scalar values container. More... | |
The Weibull statistical parametric distribution.
Implementats the GenericDistribution interface.
| WeibullDistribution::WeibullDistribution | ( | ) |
WeibullDistribution constructor.
References setParameters().
| WeibullDistribution::WeibullDistribution | ( | ScalarType | a, |
| ScalarType | b, | ||
| ScalarType | valueShift = 0 |
||
| ) |
WeibullDistribution constructor.
Distrubtion parameters can be directly set during object construction.
| a | the Weibull a parameter (also known as 'k') |
| b | the Weibull b parameter (also known as 'lambda') |
| valueShift | a value shift ('zero') |
References a, and setParameters().
|
overridevirtual |
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) |
Implements cloudViewer::GenericDistribution.
References chi2ClassesPositions, cloudViewer::ScalarFieldTools::countScalarFieldValidValues(), cloudViewer::GenericCloud::getPointScalarValue(), setChi2ClassesPositions(), cloudViewer::GenericCloud::size(), and cloudViewer::ScalarField::ValidValue().
|
staticprotected |
internal function for parameters evaluation from sample points
inverseVmax can be optionally specified for overflow-safe version
References cloudViewer::GreaterThanEpsilon(), cloudViewer::ScalarField::ValidValue(), and ZERO_TOLERANCE_D.
Referenced by FindGRoot().
| double WeibullDistribution::computeMode | ( | ) | const |
Returns the distribution 'mode'.
References m_a, m_b, and m_valueShift.
Referenced by ccEntityAction::computeStatParams(), and define_WeibullDistribution().
|
overridevirtual |
Computes the probability of x.
| x | the variable |
Implements cloudViewer::GenericDistribution.
References m_a, m_b, m_valueShift, and x.
|
overridevirtual |
Computes the cumulative probability between x1 and x2.
x1 should be lower than x2
| x1 | the lower boundary |
| x2 | the upper boundary |
Implements cloudViewer::GenericDistribution.
References m_a, m_b, and m_valueShift.
|
overridevirtual |
Computes the distribution parameters from a set of values.
| values | a set of scalar values |
Implements cloudViewer::GenericDistribution.
References a, FindGRoot(), setParameters(), cloudViewer::GenericDistribution::setValid(), and cloudViewer::ScalarField::ValidValue().
|
overridevirtual |
Computes the cumulative probability between 0 and x.
| x | the upper boundary |
Implements cloudViewer::GenericDistribution.
References m_a, m_b, m_valueShift, and x.
| double WeibullDistribution::computeSkewness | ( | ) | const |
Returns the distribution 'skewness'.
References Gamma_cc(), cloudViewer::GenericDistribution::isValid(), m_a, m_b, m_mu, and m_sigma2.
Referenced by ccEntityAction::computeStatParams(), and define_WeibullDistribution().
|
staticprotected |
internal function for parameters evaluation from sample points
References ComputeG(), e3, cloudViewer::GreaterThanEpsilon(), and cloudViewer::LessThanEpsilon().
Referenced by computeParameters().
|
inlineoverridevirtual |
Returns distribution name.
Implements cloudViewer::GenericDistribution.
| bool WeibullDistribution::getOtherParameters | ( | ScalarType & | mu, |
| ScalarType & | sigma2 | ||
| ) | const |
Returns the normal distribution equivalent parameters.
| mu | a field to transmit the equivalent mean |
| sigma2 | a field to transmit the equivalent variance |
References cloudViewer::GenericDistribution::isValid(), m_mu, and m_sigma2.
Referenced by define_WeibullDistribution().
| bool WeibullDistribution::getParameters | ( | ScalarType & | a, |
| ScalarType & | b | ||
| ) | const |
Returns the distribution parameters.
| a | the Weibull a parameter (also known as 'k') |
| b | the Weibull b parameter (also known as 'lambda') |
References a, cloudViewer::GenericDistribution::isValid(), m_a, and m_b.
Referenced by ccEntityAction::computeStatParams(), and define_WeibullDistribution().
|
inline |
Returns the distribution value shift.
Referenced by ccEntityAction::computeStatParams(), and define_WeibullDistribution().
|
protectedvirtual |
Compute each Chi2 class limits.
This method is used (internally) to accelerate the Chi2 distance computation.
| numberOfClasses | the number of classes that will be used for Chi2 distance computation |
References chi2ClassesPositions, cloudViewer::GenericDistribution::isValid(), m_a, and m_b.
Referenced by computeChi2Dist().
| bool WeibullDistribution::setParameters | ( | ScalarType | a, |
| ScalarType | b, | ||
| ScalarType | valueShift = 0 |
||
| ) |
Sets the distribution parameters.
| a | the Weibull a parameter (also known as 'k') |
| b | the Weibull b parameter (also known as 'lambda') |
| valueShift | a value shift ('zero') |
References a, chi2ClassesPositions, Gamma_cc(), cloudViewer::GenericDistribution::isValid(), m_a, m_b, m_mu, m_sigma2, m_valueShift, and cloudViewer::GenericDistribution::setValid().
Referenced by computeParameters(), define_WeibullDistribution(), CommandStatTest::process(), ccEntityAction::statisticalTest(), and WeibullDistribution().
| void WeibullDistribution::setValueShift | ( | ScalarType | vs | ) |
Sets the distribution value shift.
| vs | value shift |
References m_valueShift, and cloudViewer::GenericDistribution::setValid().
Referenced by define_WeibullDistribution().
|
protected |
Chi2 classes limits.
Used internally. Stores both limits for each class in a vector (min_class_1, max_class_1, min_class_2, max_class_2, etc.).
Referenced by computeChi2Dist(), setChi2ClassesPositions(), and setParameters().
|
protected |
Weibull distribution parameter a (k)
Referenced by computeMode(), computeP(), computePfromZero(), computeSkewness(), getParameters(), setChi2ClassesPositions(), and setParameters().
|
protected |
Weibull distribution parameter b (lambda)
Referenced by computeMode(), computeP(), computePfromZero(), computeSkewness(), getParameters(), setChi2ClassesPositions(), and setParameters().
|
protected |
Normal distribution equivalent parameter: mean.
Referenced by computeSkewness(), getOtherParameters(), and setParameters().
|
protected |
Normal distribution equivalent parameter: variance.
Referenced by computeSkewness(), getOtherParameters(), and setParameters().
|
protected |
Weibull distribution parameter 'value shift'.
Referenced by computeMode(), computeP(), computePfromZero(), setParameters(), and setValueShift().
|
protected |
Parameters validity.