|
Honeycomb
0.1
Component-Model Framework
|
Base class for all random distributions. More...
#include <Dist.h>

Public Member Functions | |
| RandomDist (optional< RandomGen & > gen=optnull) | |
| Construct with a random generator to use for next() More... | |
| virtual | ~RandomDist () |
| virtual Real | next () const |
| Get next randomly distributed variate. Requires a random generator (see ctor or setGen()) More... | |
| virtual Real | pdf (Real x) const |
| Probability Density Function. More... | |
| virtual Real | cdf (Real x) const |
| Cumulative Distribution Function. More... | |
| virtual Real | cdfComp (Real x) const |
| Complement of the CDF. More... | |
| virtual Real | cdfInv (Real P) const |
| Inverse of the CDF. More... | |
| virtual Real | mean () const |
| Calc mean. More... | |
| virtual Real | variance () const |
| Calc variance. More... | |
| Real | stdDev () const |
| Calc standard deviation. More... | |
| void | setGen (RandomGen &gen) |
| Set random generator to use for next() More... | |
| RandomGen & | getGen () const |
| Get random generator. More... | |
Protected Types | |
| typedef Numeral< Real >::Real_ | Real_ |
| typedef Real_::DoubleType | Double_ |
| typedef Double_::Real | Double |
| typedef Alge_< Real > | Alge |
| typedef Alge_< Double > | Alge_d |
| typedef Uniform_< Double > | Uniform |
Protected Member Functions | |
| Real | cdfInvFind (Real P, Real min, Real max, bool discrete=false) const |
| Generic binary search algorithm to find Cdf. More... | |
Base class for all random distributions.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
Construct with a random generator to use for next()
|
inlinevirtual |
|
inlinevirtual |
Cumulative Distribution Function.
The integral of the PDF from -inf to x.
| x | value, range depends on distribution. |
| P | a probability in range [0,1] that a random variate will be <= x. |
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::HyperGeo_< Real >, honey::Gamma_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, and honey::Uniform_< Real >.
|
inlinevirtual |
Complement of the CDF.
The integral of the PDF from x to inf.
| x | value, range depends on distribution. |
| Q | a probability in range [0,1] that a random variate will be > x. |
Reimplemented in honey::StudentT_< Real >, honey::Gamma_< Real >, honey::Poisson_< Real >, and honey::Weibull_< Real >.
|
inlinevirtual |
Inverse of the CDF.
| P | cumulative probability |
| x | A value that has probability P of being >= a random variate X. Also, x satisfies: cdf(x) = P. |
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::Gamma_< Real >, honey::HyperGeo_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, and honey::Uniform_< Real >.
|
protected |
Generic binary search algorithm to find Cdf.
|
inline |
Get random generator.
|
inlinevirtual |
Calc mean.
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::Gamma_< Real >, honey::HyperGeo_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, honey::Discrete_< Int >, and honey::Uniform_< Real >.
|
inlinevirtual |
Get next randomly distributed variate. Requires a random generator (see ctor or setGen())
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::HyperGeo_< Real >, honey::Gamma_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, honey::Discrete_< Int >, and honey::Uniform_< Real >.
|
inlinevirtual |
Probability Density Function.
The PDF integrates to 1 over the entire range of possible values of x.
| x | value, range depends on distribution. |
| p | a relative likelihood in range [0,inf] that a random variate X will equal x. |
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::HyperGeo_< Real >, honey::Gamma_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, and honey::Uniform_< Real >.
|
inline |
Set random generator to use for next()
|
inline |
Calc standard deviation.
|
inlinevirtual |
Calc variance.
Reimplemented in honey::ChiSqr_< Real >, honey::StudentT_< Real >, honey::Beta_< Real >, honey::Gamma_< Real >, honey::HyperGeo_< Real >, honey::Poisson_< Real >, honey::BinomialNeg_< Real >, honey::DiscreteGen_< Real >, honey::Weibull_< Real >, honey::Binomial_< Real >, honey::Gaussian_< Real >, honey::Discrete_< Int >, and honey::Uniform_< Real >.
1.8.10