1 #ifndef STAT_PoissonDistribution_H
2 #define STAT_PoissonDistribution_H
5 #include <boost/math/distributions/poisson.hpp>
6 #include <boost/random/poisson_distribution.hpp>
7 #include <boost/random/variate_generator.hpp>
25 boost::math::poisson_distribution<tReal> *mDistribution;
26 boost::random::poisson_distribution<int,tReal> *mRandomDistribution;
27 boost::random::variate_generator<
RNGType&,
28 boost::random::poisson_distribution<int,tReal> > *mGenerator;
56 inline static SP::STAT_PoissonDistribution
New(
const tReal&
mean) {
59 p->setProperties(mean);
65 inline static SP::STAT_PoissonDistribution
New() {
virtual tReal computeGrowthRate()
return the growth rate of the distribution such that Esperance(E(exp(-z*X)))=0.5
Definition: STAT_Distribution.h:133
static SP::STAT_PoissonDistribution New()
create a Poisson distibution
Definition: STAT_PoissonDistribution.h:65
virtual tReal standardDeviation() const
compute the standard deviation
Definition: STAT_PoissonDistribution.cpp:71
virtual tReal mean() const =0
compute the mean
virtual tReal random() const
random return a random numbers in range
Definition: STAT_PoissonDistribution.cpp:76
#define tBoolean
Definition: types.h:48
virtual tReal cdf(const tReal &x) const
compute the cumulative distribution function at x point
Definition: STAT_PoissonDistribution.cpp:50
virtual SP::STAT_Distribution NewInstance() const
create a new instance of the distribution
Definition: STAT_PoissonDistribution.h:70
DEFINE_SPTR(STAT_PoissonDistribution)
static SP::STAT_PoissonDistribution New(const tReal &mean)
create a Poisson distibution
Definition: STAT_PoissonDistribution.h:56
virtual tReal cdfc(const tReal &x) const
compute the cumulative distribution complement function at x point
Definition: STAT_PoissonDistribution.cpp:56
virtual void computeSample(const int &n, CORE_RealArray &sample) const
compute a sample of size n
Definition: STAT_PoissonDistribution.cpp:82
this class describes an array
Definition: CORE_Array.h:18
virtual ~STAT_PoissonDistribution(void)
destroy an object.
Definition: STAT_PoissonDistribution.cpp:13
virtual tReal variance() const
compute the variance
Definition: STAT_PoissonDistribution.cpp:66
virtual void range(tReal &xmin, tReal &xmax) const
compute the range of the distribution
Definition: STAT_PoissonDistribution.cpp:37
This class is the class to describes general distribution.
Definition: STAT_Distribution.h:25
void setProperties(const tReal &mean)
Definition: STAT_PoissonDistribution.cpp:22
virtual tReal pdf(const tReal &x) const
compute the probability density function at x point
Definition: STAT_PoissonDistribution.cpp:45
virtual tReal mean() const
compute the mean
Definition: STAT_PoissonDistribution.cpp:61
STAT_PoissonDistribution()
create an object
Definition: STAT_PoissonDistribution.cpp:5
boost::mt19937 RNGType
Definition: STAT_Distribution.h:23
This class is the class to describes Poisson distribution.
Definition: STAT_PoissonDistribution.h:16
void getProperties(tReal &m)
Definition: STAT_PoissonDistribution.h:87
#define tReal
Definition: types.h:18
virtual void copy(const STAT_Distribution &d)
copy the distribution
Definition: STAT_PoissonDistribution.h:77
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106