|
| diracDistribution (double val) |
| Unique constructor for the Dirac distribution from its value. More...
|
|
double | value (int) |
| Read accessor to the value of the Dirac distribution. More...
|
|
double | mean () |
| computing the mathematical expectation or mean More...
|
|
double | rate () |
| computing the "rate", defined as the inverse of the mean More...
|
|
double | moment (int order) |
| Computing the moments of the distribution. More...
|
|
double | variance () |
| Variance of the Dirac distribution. Reimplemented to return always 0. 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 for the existence of moments of any order More...
|
|
diracDistribution * | 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...
|
|
diracDistribution * | copy () |
| copying a distribution. Typically implemented as rescale(1.0). More...
|
|
double | sample () |
| drawing a (pseudo)random value according to the distribution. More...
|
|
void | iidSample (int n, double *s) |
| Sampling of i.i.d. values in a table. Reimplemented in order to avoid useless function calls. More...
|
|
std::string | toString () |
| an utility to convert the distribution into a string. More...
|
|
void | write (FILE *out, int mode) |
| an utility to write the distribution to some file, according to some format. More...
|
|
| discreteDistribution (int sz, double *vals, double *probas) |
| Constructor for a general discrete distribution from arrays. The array is ***copied***, not taken as pointer. The mean is calculated at creation. More...
|
|
| discreteDistribution (int sz, char *name) |
| Constructor for a general discrete distribution from a file. The file is assumed to contain only the probas. The values are arbitrarily chosen between 0 and sz-1. The mean is calculated at creation. More...
|
|
| ~discreteDistribution () |
| Destructor for a general discrete distribution. The convention is that internal arrays for values and probas are freed at this moment. If they are useful for something else, they sould be copied. More...
|
|
double | getProba (int i) |
| Read accessor for the probas. This is a pseudo-accessor since it performs additional checks. More...
|
|
double | getValue (int i) |
| Read accessor for the values. This is a pseudo-accessor since it performs additional checks. More...
|
|
int | nbVals () |
| Read accessor to the number of values in the distribution. More...
|
|
bool | setProba (int i, double v) |
| Write accessor for the probas. This is a pseudo-accessor since it performs additional checks. More...
|
|
double | mean () |
| Calculation of the mean. Returns the value since it is pre-computed. More...
|
|
double | rate () |
| Calculation of the rate, which is the inverse of the mean. If the mean is 0, the value INFINITE_RATE is returned. 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) |
| Computation of the cumulative density function at some real point x. More...
|
|
bool | hasMoment (int order) |
| Test of existence of a moment. These distributions always have one. More...
|
|
discreteDistribution * | 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...
|
|
discreteDistribution * | copy () |
| copying a distribution. Typically implemented as rescale(1.0). More...
|
|
double | sample () |
| Sampling from the law This is the straightforward, non optimized, linear-time algorithm. More...
|
|
double | distanceL2 (discreteDistribution *d) |
| Computes the L2 distance between two distributions. In case of incompatible or infinite sizes, a negative number is returned. More...
|
|
double | distanceL1 (discreteDistribution *d) |
| Computes the L1 distance between this distribution and another one. In case of incompatible or infinite sizes, a negative number is returned. More...
|
|
double | distanceLinfinity (discreteDistribution *d) |
| Computes the L-infinity distance between two distributions. In case of incompatible or infinite sizes, a negative number is returned. More...
|
|
std::string | toString () |
| Printing a representation of the law into a string. More...
|
|
void | write (FILE *out, int mode) |
| Printing a representation of the law. 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 Dirac distribution concentrated at some point.