STK++ 0.9.13
|
Interface base class for all the univariate distributions. More...
#include <STK_Law_IUnivLaw.h>
Public Member Functions | |
virtual | ~IUnivLaw () |
Virtual destructor. | |
virtual Type | rand () const =0 |
virtual Real | pdf (Type const &x) const =0 |
compute the probability distribution function (density) in the continuous case and the probability mass function in the discrete case. | |
virtual Type | icdf (Real const &p) const =0 |
inverse cumulative distribution function The quantile is defined as the smallest value x such that F(x) >= p , where F is the cumulative distribution function. | |
virtual Real | lpdf (Type const &x) const |
compute the log probability distribution function Give the value of the log-pdf at the point x. | |
virtual Real | cdf (Real const &t) const =0 |
compute the lower tail cumulative distribution function Give the probability that a random variate is less or equal to t. | |
virtual Real | lcdf (Real const &t) const |
compute the lower tail log-cumulative distribution function Give the log-probability that a random variate is less or equal to t. | |
virtual Real | cdfc (Real const &t) const |
calculate the complement of cumulative distribution function, called in statistics the survival function. | |
virtual Real | lcdfc (Real const &t) const |
calculate the log-complement of cumulative distribution function Give the log-probability that a random variate is greater than t. | |
![]() | |
String const & | name () const |
Protected Member Functions | |
IUnivLaw (String const &name) | |
Constructor. | |
IUnivLaw (IUnivLaw const &law) | |
copy Constructor. | |
![]() | |
ILawBase (String const &name) | |
Constructor. | |
~ILawBase () | |
destructor. | |
Additional Inherited Members | |
![]() | |
String | name_ |
Name of the Law. | |
Interface base class for all the univariate distributions.
A general probability law (discrete or real) possess a probability distribution function (pdf), a cumulative distribution function (cdt) and an inverse cumulative distribution function (icdf). It can be simulated (random number generation).
Interface base class for the univariate distributions. Every derived class have to furnish :
The derived objects should also furnish the same static functions. Instantiation of a derived object is interesting when one want to simulate independent identical distributed random variates: at creation, the object initializes all parameter-dependent variables.
Definition at line 71 of file STK_Law_IUnivLaw.h.
|
inlineprotected |
Constructor.
name | the name of the law |
Definition at line 77 of file STK_Law_IUnivLaw.h.
|
inlineprotected |
copy Constructor.
law | the law to copy |
Definition at line 81 of file STK_Law_IUnivLaw.h.
|
inlinevirtual |
|
pure virtual |
compute the lower tail cumulative distribution function Give the probability that a random variate is less or equal to t.
t | a real number |
Implemented in STK::Law::Bernoulli, STK::Law::Beta, STK::Law::Binomial, STK::Law::Categorical, STK::Law::Cauchy, STK::Law::ChiSquared, STK::Law::Exponential, STK::Law::FisherSnedecor, STK::Law::Gamma, STK::Law::Geometric, STK::Law::HyperGeometric, STK::Law::Logistic, STK::Law::LogNormal, STK::Law::NegativeBinomial, STK::Law::Normal, STK::Law::Poisson, STK::Law::Student, STK::Law::Uniform, STK::Law::UniformDiscrete, and STK::Law::Weibull.
Referenced by STK::Law::IUnivLaw< Type >::cdfc(), and STK::Law::IUnivLaw< Type >::lcdf().
|
inlinevirtual |
calculate the complement of cumulative distribution function, called in statistics the survival function.
Give the probability that a random variate is greater than t.
t | a real number |
Definition at line 126 of file STK_Law_IUnivLaw.h.
References STK::Law::IUnivLaw< Type >::cdf().
Referenced by STK::Law::IUnivLaw< Type >::lcdfc(), and main().
|
pure virtual |
inverse cumulative distribution function The quantile is defined as the smallest value x such that F(x) >= p , where F is the cumulative distribution function.
p | a probability |
Implemented in STK::Law::Beta, STK::Law::Binomial, STK::Law::Cauchy, STK::Law::ChiSquared, STK::Law::Exponential, STK::Law::FisherSnedecor, STK::Law::Gamma, STK::Law::Geometric, STK::Law::HyperGeometric, STK::Law::Logistic, STK::Law::LogNormal, STK::Law::NegativeBinomial, STK::Law::Normal, STK::Law::Poisson, STK::Law::Student, STK::Law::Uniform, STK::Law::UniformDiscrete, STK::Law::Weibull, STK::Law::Bernoulli, and STK::Law::Categorical.
|
inlinevirtual |
compute the lower tail log-cumulative distribution function Give the log-probability that a random variate is less or equal to t.
t | a real number |
Definition at line 120 of file STK_Law_IUnivLaw.h.
References STK::Law::IUnivLaw< Type >::cdf().
Referenced by main().
|
inlinevirtual |
calculate the log-complement of cumulative distribution function Give the log-probability that a random variate is greater than t.
t | a real number |
Definition at line 132 of file STK_Law_IUnivLaw.h.
References STK::Law::IUnivLaw< Type >::cdfc().
Referenced by main().
|
inlinevirtual |
compute the log probability distribution function Give the value of the log-pdf at the point x.
x | the value to compute the lpdf. |
Reimplemented in STK::Law::Bernoulli, STK::Law::Categorical, STK::Law::Poisson, STK::Law::UniformDiscrete, STK::Law::Binomial, STK::Law::Geometric, STK::Law::HyperGeometric, STK::Law::NegativeBinomial, STK::Law::Beta, STK::Law::Cauchy, STK::Law::ChiSquared, STK::Law::Exponential, STK::Law::FisherSnedecor, STK::Law::Gamma, STK::Law::Logistic, STK::Law::LogNormal, STK::Law::Normal, STK::Law::Student, STK::Law::Uniform, and STK::Law::Weibull.
Definition at line 108 of file STK_Law_IUnivLaw.h.
References STK::Law::IUnivLaw< Type >::pdf().
|
pure virtual |
compute the probability distribution function (density) in the continuous case and the probability mass function in the discrete case.
x | the value to compute the pdf. |
Implemented in STK::Law::Bernoulli, STK::Law::Categorical, STK::Law::Poisson, STK::Law::UniformDiscrete, STK::Law::Binomial, STK::Law::Geometric, STK::Law::HyperGeometric, STK::Law::NegativeBinomial, STK::Law::Beta, STK::Law::Cauchy, STK::Law::ChiSquared, STK::Law::Exponential, STK::Law::FisherSnedecor, STK::Law::Gamma, STK::Law::Logistic, STK::Law::LogNormal, STK::Law::Normal, STK::Law::Student, STK::Law::Uniform, and STK::Law::Weibull.
Referenced by STK::Law::IUnivLaw< Type >::lpdf().
|
pure virtual |
Type
random variate . Implemented in STK::Law::Bernoulli, STK::Law::Beta, STK::Law::Binomial, STK::Law::Categorical, STK::Law::Cauchy, STK::Law::ChiSquared, STK::Law::Exponential, STK::Law::FisherSnedecor, STK::Law::Gamma, STK::Law::Geometric, STK::Law::HyperGeometric, STK::Law::Logistic, STK::Law::LogNormal, STK::Law::NegativeBinomial, STK::Law::Normal, STK::Law::Poisson, STK::Law::Student, STK::Law::Uniform, STK::Law::UniformDiscrete, and STK::Law::Weibull.