16 #ifndef diracDistribution_H
17 #define diracDistribution_H
19 #include "discreteDistribution.h"
47 double value(
int) {
return _value; };
68 double moment(
int order );
85 double cdf(
double x );
120 void write( FILE *out,
int mode );
124 #endif // diracDistribution_H
double dLaplace(double s)
computing the derivative of the Laplace transform at real points
Definition: diracDistribution.cpp:135
diracDistribution * copy()
copying a distribution. Typically implemented as rescale(1.0).
Definition: diracDistribution.cpp:201
double variance()
Variance of the Dirac distribution. Reimplemented to return always 0.
Definition: diracDistribution.cpp:99
double sample()
drawing a (pseudo)random value according to the distribution.
Definition: diracDistribution.cpp:209
void iidSample(int n, double *s)
Sampling of i.i.d. values in a table. Reimplemented in order to avoid useless function calls...
Definition: diracDistribution.cpp:216
double getProba(double value)
Calculation of the mean. Returns the value since it is pre-computed.
Definition: diracDistribution.cpp:46
diracDistribution * rescale(double factor)
rescaling a distribution by some real factor. Not all distributions allow this for any real factor...
Definition: diracDistribution.cpp:191
double moment(int order)
Computing the moments of the distribution.
Definition: diracDistribution.cpp:90
The Dirac distribution concentrated at some point.
Definition: diracDistribution.h:26
diracDistribution(double val)
Unique constructor for the Dirac distribution from its value.
Definition: diracDistribution.cpp:27
double cdf(double x)
computing the cumulative distribution function at some real point x. This is the probability that the...
Definition: diracDistribution.cpp:149
std::string toString()
an utility to convert the distribution into a string.
Definition: diracDistribution.cpp:179
double rate()
computing the "rate", defined as the inverse of the mean
Definition: diracDistribution.cpp:74
bool hasMoment(int order)
test for the existence of moments of any order
Definition: diracDistribution.cpp:110
double laplace(double s)
computing the Laplace transform of the distribution at real point
Definition: diracDistribution.cpp:121
double mean()
computing the mathematical expectation or mean
Definition: diracDistribution.cpp:62
double value(int)
Read accessor to the value of the Dirac distribution.
Definition: diracDistribution.h:47
The general discrete distribution with finite support.
Definition: discreteDistribution.h:25
void write(FILE *out, int mode)
an utility to write the distribution to some file, according to some format.
Definition: diracDistribution.cpp:164