The class representing the (negative) exponential distribution.
More...
#include <exponentialDistribution.h>
|
| exponentialDistribution (double val) |
| Unique constructor for the exponential distribution, from its average. The rate is computed at creation time. More...
|
|
double | rate () |
| Read accessor for the rate. More...
|
|
double | mean () |
| Calculation of the mean. Returns the value since it is pre-computed. More...
|
|
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) |
| computing the cumulative distribution function at some real point x. This is the probability that the random variable is less or equal to x. More...
|
|
bool | hasMoment (int order) |
| Test of existence of a moment. These distributions always have one. More...
|
|
exponentialDistribution * | rescale (double factor) |
| rescaling a distribution by some real factor. Not all distributions allow this for any real factor. If the operation fails, or if the factor is 1.0, a copy of the distribution should be returned (not by using the copy() function). More...
|
|
exponentialDistribution * | copy () |
| copying a distribution. Typically implemented as rescale(1.0). More...
|
|
double | sample () |
| Sampling from the law. Uses the mother class method. More...
|
|
std::string | toString () |
| Printing a representation of the law into a string. More...
|
|
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...
|
|
The class representing the (negative) exponential distribution.
exponentialDistribution::exponentialDistribution |
( |
double |
val | ) |
|
Unique constructor for the exponential distribution, from its average. The rate is computed at creation time.
- Author
- Alain Jean-Marie
- Parameters
-
val | the mean of the distribution |
double exponentialDistribution::cdf |
( |
double |
x | ) |
|
|
virtual |
computing the cumulative distribution function at some real point x. This is the probability that the random variable is less or equal to x.
- Parameters
-
x | the value at which to compute the cdf |
- Returns
- the value of the cdf
Implements Distribution.
copying a distribution. Typically implemented as rescale(1.0).
- See Also
- rescale(double)
- Returns
- a copy of the distribution
Implements Distribution.
double exponentialDistribution::dLaplace |
( |
double |
s | ) |
|
|
virtual |
computing the derivative of the Laplace transform at real points
- Parameters
-
s | the value at which to compute |
- Returns
- the value of the derivative of the Laplace transform
Implements Distribution.
bool exponentialDistribution::hasMoment |
( |
int |
order | ) |
|
|
virtual |
Test of existence of a moment. These distributions always have one.
- Author
- Alain Jean-Marie
- Parameters
-
- Returns
- true
Implements Distribution.
double exponentialDistribution::laplace |
( |
double |
s | ) |
|
|
virtual |
computing the Laplace transform of the distribution at real point
- Parameters
-
s | the value at which to compute |
- Returns
- the value of the Laplace transform
Implements Distribution.
double exponentialDistribution::mean |
( |
| ) |
|
|
inlinevirtual |
Calculation of the mean. Returns the value since it is pre-computed.
- Author
- Alain Jean-Marie
- Returns
- the mathematical expectation of the distribution
Implements Distribution.
double exponentialDistribution::moment |
( |
int |
order | ) |
|
|
virtual |
Computing the moments of the distribution.
- Parameters
-
order | the order of the moment to be computed |
- Returns
- the moment
Implements Distribution.
double exponentialDistribution::rate |
( |
| ) |
|
|
inlinevirtual |
Read accessor for the rate.
- Returns
- the value of the rate
Implements Distribution.
rescaling a distribution by some real factor. Not all distributions allow this for any real factor. If the operation fails, or if the factor is 1.0, a copy of the distribution should be returned (not by using the copy() function).
- See Also
- copy()
- Parameters
-
factor | the real factor to be used |
- Returns
- a new distribution object
Implements Distribution.
double exponentialDistribution::sample |
( |
| ) |
|
|
virtual |
Sampling from the law. Uses the mother class method.
- Returns
- a sample from the exponential distribution
Implements Distribution.
std::string exponentialDistribution::toString |
( |
| ) |
|
|
virtual |
Printing a representation of the law into a string.
- Author
- Alain Jean-Marie
- Returns
- a string with a symbol for the law and its parameter
Implements Distribution.
void exponentialDistribution::write |
( |
FILE * |
out, |
|
|
int |
mode |
|
) |
| |
|
virtual |
Printing a representation of the law
- Author
- Alain Jean-Marie
- Parameters
-
out | the file descriptor of the output stream |
mode | representation for the output |
Implements Distribution.
The documentation for this class was generated from the following files: