16 #ifndef poissonDistribution_H
17 #define poissonDistribution_H
19 #include "Distribution.h"
54 static RInside* _Rmotor;
56 typedef void* RInside;
57 static RInside* _Rmotor;
95 double moment(
int order );
111 double cdf(
double x );
115 double ccdf(
double x );
146 void write( FILE *out,
int mode );
150 #endif // poissonDistribution_H
double ccdf(double x)
computing the complementary cumulative distributon function (or tail) at some real point x...
double sample()
Sample from the Poisson distibution. Uses the "R" package.
Definition: poissonDistribution.cpp:289
void write(FILE *out, int mode)
an utility to write the distribution to some file, according to some format.
Definition: poissonDistribution.cpp:227
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 be...
Definition: poissonDistribution.cpp:319
bool hasMoment(int order)
test for the existence of moments of any order
Definition: poissonDistribution.cpp:137
~poissonDistribution()
Destructor for a Poisson distribution.
Definition: poissonDistribution.cpp:38
std::string toString()
an utility to convert the distribution into a string.
Definition: poissonDistribution.cpp:250
double moment(int order)
Computing the moments of the distribution.
Definition: poissonDistribution.cpp:101
poissonDistribution(double lambda)
Constructor for a Poisson distribution from its "lambda" parameter. The mean is calculated at creatio...
Definition: poissonDistribution.cpp:27
double cdf(double x)
computing the cumulative distribution function at some real point x. This is the probability that the...
Definition: poissonDistribution.cpp:180
double variance()
Computing the variance of the random variable: the second moment minus the square of the first moment...
A class for representing probability distributions.
Definition: Distribution.h:44
poissonDistribution * rescale(double factor)
rescaling a distribution by some real factor. Not all distributions allow this for any real factor...
Definition: poissonDistribution.cpp:267
The Poisson distribution. The parameter is called "lambda". The Poisson distribution is discrete but ...
Definition: poissonDistribution.h:31
double mean()
computing the mathematical expectation or mean
Definition: poissonDistribution.cpp:74
poissonDistribution * copy()
copying a distribution. Typically implemented as rescale(1.0).
Definition: poissonDistribution.cpp:281
double getProba(double k)
Function to obtain the probability of a specific value k.
Definition: poissonDistribution.cpp:201
double laplace(double s)
computing the Laplace transform of the distribution at real point
Definition: poissonDistribution.cpp:148
double lambda()
Function to obtain the parameter (or ratio) of the distribution. Redundant with p() but defined to be...
Definition: poissonDistribution.h:80
double rate()
computing the "rate", defined as the inverse of the mean
Definition: poissonDistribution.cpp:85
double dLaplace(double s)
computing the derivative of the Laplace transform at real points
Definition: poissonDistribution.cpp:164