1 #ifndef STAT_GeometricDistribution_H
2 #define STAT_GeometricDistribution_H
9 #include <boost/math/distributions/geometric.hpp>
10 #include <boost/random/geometric_distribution.hpp>
11 #include <boost/random/variate_generator.hpp>
29 SP::STAT_UniformDistribution mUniform;
31 boost::math::geometric_distribution<tReal> *mDistribution;
32 boost::random::geometric_distribution<int,tReal> *mRandomDistribution;
33 boost::random::variate_generator<
RNGType&,
34 boost::random::geometric_distribution<int,tReal> > *mGenerator;
61 inline static SP::STAT_GeometricDistribution
New(
const tReal& prob) {
64 p->setProperties(prob);
70 inline static SP::STAT_GeometricDistribution
New() {
static SP::STAT_GeometricDistribution New(const tReal &prob)
create a Geometric distibution
Definition: STAT_GeometricDistribution.h:61
This class is the class to describes Geometric distribution.
Definition: STAT_GeometricDistribution.h:20
virtual void copy(const STAT_Distribution &d)
copy the distribution
Definition: STAT_GeometricDistribution.h:82
virtual tReal mean() const
compute the mean
Definition: STAT_GeometricDistribution.cpp:64
virtual tReal computeGrowthRate()
return the growth rate of the distribution such that Esperance(E(exp(-z*X)))=0.5
Definition: STAT_Distribution.h:133
void setProperties(const tReal &p)
Definition: STAT_GeometricDistribution.cpp:24
virtual tReal cdfc(const tReal &x) const
compute the cumulative distribution complement function at x point
Definition: STAT_GeometricDistribution.cpp:59
virtual tReal mean() const =0
compute the mean
#define tBoolean
Definition: types.h:48
virtual tReal standardDeviation() const
compute the standard deviation
Definition: STAT_GeometricDistribution.cpp:74
virtual void computeSample(const int &n, CORE_RealArray &sample) const
compute a sample of size n
Definition: STAT_GeometricDistribution.cpp:91
virtual tReal pdf(const tReal &x) const
compute the probability density function at x point
Definition: STAT_GeometricDistribution.cpp:48
virtual tReal random() const
random return a random numbers
Definition: STAT_GeometricDistribution.cpp:79
STAT_GeometricDistribution()
create an object
Definition: STAT_GeometricDistribution.cpp:6
virtual SP::STAT_Distribution NewInstance() const
create a new instance of the distribution
Definition: STAT_GeometricDistribution.h:75
virtual tReal variance() const
compute the variance
Definition: STAT_GeometricDistribution.cpp:69
this class describes an array
Definition: CORE_Array.h:18
static SP::STAT_GeometricDistribution New()
create a Geometric distibution
Definition: STAT_GeometricDistribution.h:70
virtual void range(tReal &xmin, tReal &xmax) const
compute the range of the distribution
Definition: STAT_GeometricDistribution.cpp:40
DEFINE_SPTR(STAT_UniformDistribution)
This class is the class to describes general distribution.
Definition: STAT_Distribution.h:25
boost::mt19937 RNGType
Definition: STAT_Distribution.h:23
virtual tReal cdf(const tReal &x) const
compute the cumulative distribution function at x point
Definition: STAT_GeometricDistribution.cpp:53
#define tReal
Definition: types.h:18
virtual ~STAT_GeometricDistribution(void)
destroy an object.
Definition: STAT_GeometricDistribution.cpp:15
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106