The geometric distribution with starting value 0. The parameter "p" is called "ratio".
More...
|
| geometricDistribution (double p) |
| Unique constructor for the class, from its "ratio". More...
|
|
double | getProba (int k) |
| Function to obtain the probability of a specific value k. More...
|
|
double | p () |
| Function to obtain the parameter (or ratio) of the distribution. Redundant with p() but defined to be more explicit. More...
|
|
double | getRatio () |
| Function to obtain the parameter (or ratio) of the distribution. Redundant with getRatio() but defined according to the coding convention. More...
|
|
double | mean () |
| Function to obtain the mean (expectation). Its value is 1/(1-_p) More...
|
|
double | rate () |
|
double | moment (int order) |
| Computing the moments of the distribution. More...
|
|
double | laplace (double s) |
| computing the Laplace transform of the distribution at real point More...
|
|
double | dLaplace (double s) |
| computing the derivative of the Laplace transform at real points More...
|
|
double | cdf (double x) |
|
bool | hasMoment (int order) |
| Test of existence of a moment. These distributions always have one. More...
|
|
geometricDistribution * | rescale (double factor) |
| Rescaling the distribution. Geometric distributions cannot be rescaled. A copy is returned. A warning is issued if the factor is not 1.0. More...
|
|
geometricDistribution * | copy () |
| copying a distribution. Typically implemented as rescale(1.0). More...
|
|
double | sample () |
| Sampling from the distribution. The method uses the fact that the integer part of an exponential random variable is a geometric random variable. More...
|
|
std::string | toString () |
|
void | write (FILE *out, int mode) |
|
| geometricDistribution (double p) |
| Unique constructor for the class, from its "ratio". More...
|
|
double | getProba (int k) |
| Function to obtain the probability of a specific value k. More...
|
|
double | p () |
| Function to obtain the parameter (or ratio) of the distribution. Redundant with p() but defined to be more explicit. More...
|
|
double | getRatio () |
| Function to obtain the parameter (or ratio) of the distribution. Redundant with getRatio() but defined according to the coding convention. More...
|
|
double | mean () |
| Function to obtain the mean (expectation). Its value is 1/(1-_p) More...
|
|
double | rate () |
|
double | moment (int order) |
| Computing the moments of the distribution. More...
|
|
double | laplace (double s) |
| computing the Laplace transform of the distribution at real point More...
|
|
double | dLaplace (double s) |
| computing the derivative of the Laplace transform at real points More...
|
|
double | cdf (double x) |
|
bool | hasMoment (int order) |
| Test of existence of a moment. These distributions always have one. More...
|
|
geometricDistribution * | rescale (double factor) |
| Rescaling the distribution. Geometric distributions cannot be rescaled. A copy is returned. A warning is issued if the factor is not 1.0. More...
|
|
geometricDistribution * | copy () |
| copying a distribution. Typically implemented as rescale(1.0). More...
|
|
double | sample () |
| Sampling from the distribution. The method uses the fact that the integer part of an exponential random variable is a geometric random variable. More...
|
|
std::string | toString () |
|
void | write (FILE *out, int mode) |
|
virtual | ~Distribution () |
| Standard destructor. More...
|
|
std::string | name () |
| Read accessor to the type name of the distribution. More...
|
|
double | variance () |
| Computing the variance of the random variable: the second moment minus the square of the first moment. Variance is the square of the coefficient of variation. The Distribution class offers a default implementation. More...
|
|
double | ccdf (double x) |
| computing the complementary cumulative distributon function (or tail) at some real point x. This is the probability that the random variable is strictly larger than x. The Distribution class offers a default implementation. More...
|
|
void | iidSample (int n, double *s) |
| drawing an i.i.d. sample from the distribution. The result is returned in an array (that must have been already allocated) passed as a parameter. The Distribution class offers the default implementation with repeated call to sample(). More...
|
|
virtual double | distanceL1 (Distribution *d) |
| Computing generally the L1 distance between distributions. More...
|
|
virtual bool | hasProperty (std::string pro) |
| Property test function. Current properties are: More...
|
|
void | fprint () |
| write on stdout with NORMAL_PRINT_MODE More...
|
|
virtual | ~Distribution () |
| Standard destructor. More...
|
|
std::string | name () |
| Read accessor to the type name of the distribution. More...
|
|
double | variance () |
| Computing the variance of the random variable: the second moment minus the square of the first moment. Variance is the square of the coefficient of variation. The Distribution class offers a default implementation. More...
|
|
double | ccdf (double x) |
| computing the complementary cumulative distributon function (or tail) at some real point x. This is the probability that the random variable is strictly larger than x. The Distribution class offers a default implementation. More...
|
|
void | iidSample (int n, double *s) |
| drawing an i.i.d. sample from the distribution. The result is returned in an array (that must have been already allocated) passed as a parameter. The Distribution class offers the default implementation with repeated call to sample(). More...
|
|
virtual double | distanceL1 (Distribution *d) |
| Computing generally the L1 distance between distributions. More...
|
|
virtual bool | hasProperty (std::string pro) |
| Property test function. Current properties are: More...
|
|
void | fprint () |
| write on stdout with NORMAL_PRINT_MODE More...
|
|
The geometric distribution with starting value 0. The parameter "p" is called "ratio".
- Author
- Alain Jean-Marie