|
| BernoulliDistribution (double) |
|
double | getParameter () |
|
double | mean () |
|
double | rate () |
|
double | moment (int n) |
|
double | variance () |
|
double | laplace (double s) |
|
double | dLaplace (double s) |
|
double | cdf (double x) |
|
bool | hasMoment (int n) |
|
BernoulliDistribution * | rescale (double factor) |
|
BernoulliDistribution * | copy () |
|
double | sample () |
|
void | iidSample (int n, double *s) |
|
std::string | toString () |
|
void | write (FILE *out, int mode) |
|
| discreteDistribution (int sz, double *vals, double *probs) |
| Constructor from tables of values and probabilities. 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) |
| Accessor for the probas. This is a pseudo-accessor since it performs additional checks. More...
|
|
double | getValue (int) |
| Accessor for the values. This is a pseudo-accessor since it performs additional checks. More...
|
|
int | nbVals () |
| accessor to the number of values in the distribution More...
|
|
bool | setProba (int, double) |
| 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. More...
|
|
double | moment (int n) |
| Calculation of the of order n. More...
|
|
double | laplace (double s) |
| Computation of the Laplace transform at some real point s. More...
|
|
double | dLaplace (double s) |
| Computation of the derivative of the Laplace transform at some real point s. More...
|
|
double | cdf (double x) |
| Computation of the cumulative density function at some real point x. More...
|
|
bool | hasMoment (int n) |
| Test of existence of a moment. These distributions always have one. More...
|
|
discreteDistribution * | rescale (double factor) |
| Rescaling the law X by some real factor f. More...
|
|
discreteDistribution * | copy () |
| Copying the law. More...
|
|
double | sample () |
| Sampling from the law This is the straightforward, non optimized, linear-time algorithm. More...
|
|
void | iidSample (int n, double *s) |
| Iid samples from the law in a table The result is stored in a table, passed as an argument, that must have been allocated beforehand. 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...
|
|
std::string | getName () |
|
double | variance () |
|
double | ccdf (double x) |
|
virtual double | distanceL1 (Distribution *) |
|
virtual bool | hasProperty (std::string) |
|
void | fprint () |
|