|
libcrn
3.9.5
A document image processing library
|
Univariate Gaussian distribution. More...
#include <CRNUnivariateGaussianPDF.h>
Inheritance diagram for crn::UnivariateGaussianPDF:
Collaboration diagram for crn::UnivariateGaussianPDF:Public Member Functions | |
| UnivariateGaussianPDF (double m, double v) | |
| Constructor. More... | |
| UnivariateGaussianPDF (const UnivariateGaussianPDF &)=default | |
| UnivariateGaussianPDF (UnivariateGaussianPDF &&)=default | |
| virtual | ~UnivariateGaussianPDF () override |
| Destructor. More... | |
| UnivariateGaussianPDF & | operator= (const UnivariateGaussianPDF &)=default |
| No assignment allowed. More... | |
| UnivariateGaussianPDF & | operator= (UnivariateGaussianPDF &&)=default |
| double | GetMean () const noexcept |
| Returns the mean of a given density function. More... | |
| void | SetMean (const double mu) noexcept |
| Sets the mean of a given density function. More... | |
| double | GetVariance () const noexcept |
| Returns the variance of a given density function. More... | |
| void | SetVariance (const double v) |
| Sets the variance of a given density function. More... | |
| double | GetDeviation () const |
| Returns the standard deviation of a given density function. More... | |
| double | ValueAt (const double x) const |
| Evaluates a pattern. More... | |
| String | ToString () const |
| Dumps a summary to a string. More... | |
| double | IntersectionAbscissa (const UnivariateGaussianPDF &pdf) const |
| Estimates intersection point between with another PDF, using trinom solving. More... | |
| double | IntersectionAbscissaApprox (const UnivariateGaussianPDF &pdf) const |
| Estimates intersection point between with another PDF, using dichotomy. More... | |
| std::vector< double > | MakeRandomSample (size_t n=1, size_t m=100, bool reseed=true) const |
| Creates a data sample following the PDF's probability law. More... | |
| void | Deserialize (xml::Element &el) |
| xml::Element | Serialize (xml::Element &parent) const |
Public Member Functions inherited from crn::Object | |
| virtual | ~Object ()=default |
Univariate Gaussian distribution.
Model for univariate Gaussian probability distribution function
Definition at line 40 of file CRNUnivariateGaussianPDF.h.
| UnivariateGaussianPDF::UnivariateGaussianPDF | ( | double | m, |
| double | v | ||
| ) |
Constructor.
Constructor
| [in] | mu | mean |
| [in] | v | variance |
Definition at line 40 of file CRNUnivariateGaussianPDF.cpp.
|
default |
|
default |
|
overridevirtual |
| void UnivariateGaussianPDF::Deserialize | ( | xml::Element & | el | ) |
| ExceptionInvalidArgument | not a UnivariateGaussianPDF |
| ExceptionNotFound | attribute not found |
| ExceptionDomain | wrong attribute |
| [in] | el | the element to read |
Definition at line 253 of file CRNUnivariateGaussianPDF.cpp.
|
inline |
Returns the standard deviation of a given density function.
Definition at line 66 of file CRNUnivariateGaussianPDF.h.
|
inlinenoexcept |
Returns the mean of a given density function.
Definition at line 56 of file CRNUnivariateGaussianPDF.h.
|
inlinenoexcept |
Returns the variance of a given density function.
Definition at line 61 of file CRNUnivariateGaussianPDF.h.
| double UnivariateGaussianPDF::IntersectionAbscissa | ( | const UnivariateGaussianPDF & | ) | const |
Estimates intersection point between with another PDF, using trinom solving.
Estimates intersection point between with another PDF, using trinom solving
| [in] | the other PDF |
Definition at line 110 of file CRNUnivariateGaussianPDF.cpp.
| double UnivariateGaussianPDF::IntersectionAbscissaApprox | ( | const UnivariateGaussianPDF & | ) | const |
Estimates intersection point between with another PDF, using dichotomy.
Estimates intersection point between with another PDF, using dichotomy
| [in] | the other PDF |
Definition at line 153 of file CRNUnivariateGaussianPDF.cpp.
| std::vector< double > UnivariateGaussianPDF::MakeRandomSample | ( | size_t | n = 1, |
| size_t | m = 100, |
||
| bool | reseed = true |
||
| ) | const |
Creates a data sample following the PDF's probability law.
Simulate a random sample following the PDF's low
| [in] | n | size of sample |
| [in] | m | temporary sample size |
| [in] | reseed | shall the random seed be reinitialized? |
Definition at line 198 of file CRNUnivariateGaussianPDF.cpp.
|
default |
No assignment allowed.
|
default |
| xml::Element UnivariateGaussianPDF::Serialize | ( | xml::Element & | parent | ) | const |
Definition at line 266 of file CRNUnivariateGaussianPDF.cpp.
|
noexcept |
Sets the mean of a given density function.
Sets the mean of a given density function
| [in] | mu | the new mean |
Definition at line 57 of file CRNUnivariateGaussianPDF.cpp.
| void UnivariateGaussianPDF::SetVariance | ( | const double | v | ) |
Sets the variance of a given density function.
Sets the variance of a given density function
| ExceptionDimension | negative variance |
| [in] | v | the new variance |
Definition at line 69 of file CRNUnivariateGaussianPDF.cpp.
| String UnivariateGaussianPDF::ToString | ( | ) | const |
Dumps a summary to a string.
Dumps a summary to a string
Definition at line 236 of file CRNUnivariateGaussianPDF.cpp.
| double UnivariateGaussianPDF::ValueAt | ( | const double | x | ) | const |
Evaluates a pattern.
Evaluates a pattern
| [in] | x | the pattern to evaluate |
Definition at line 88 of file CRNUnivariateGaussianPDF.cpp.
1.8.6