1 #ifndef STAT_GammaDistribution_H
2 #define STAT_GammaDistribution_H
5 #include <boost/math/distributions/gamma.hpp>
6 #include <boost/random/gamma_distribution.hpp>
7 #include <boost/random/variate_generator.hpp>
27 boost::math::gamma_distribution<tReal> *mDistribution;
28 boost::random::gamma_distribution<tReal> *mRandomDistribution;
29 boost::random::variate_generator<
RNGType&,
30 boost::random::gamma_distribution<tReal> > *mGenerator;
58 inline static SP::STAT_GammaDistribution
New(
const tReal& shape,
62 p->setProperties(shape,scale);
68 inline static SP::STAT_GammaDistribution
New() {
94 shape=mDistribution->shape();
95 scale=mDistribution->scale();
140 virtual void computeSample(
const int& n,
double* samples)
const;
virtual ~STAT_GammaDistribution(void)
destroy an object.
Definition: STAT_GammaDistribution.cpp:15
static SP::STAT_GammaDistribution New(const tReal &shape, const tReal &scale)
create a Gamma distibution
Definition: STAT_GammaDistribution.h:58
void setProperties(const tReal &shape, const tReal &scale)
Definition: STAT_GammaDistribution.cpp:24
virtual tReal cdf(const tReal &x) const
compute the cumulative distribution function at x point
Definition: STAT_GammaDistribution.cpp:53
virtual tReal computeGrowthRate()
return the growth rate of the distribution such that Esperance(E(exp(-z*X)))=0.5
Definition: STAT_Distribution.h:133
DEFINE_SPTR(STAT_GammaDistribution)
virtual void computeSample(const int &n, CORE_RealArray &sample) const
compute a sample of size n
Definition: STAT_GammaDistribution.cpp:87
virtual tReal cdfc(const tReal &x) const
compute the cumulative distribution complement function at x point
Definition: STAT_GammaDistribution.cpp:59
virtual tReal mean() const =0
compute the mean
#define tBoolean
Definition: types.h:48
virtual tReal variance() const
compute the variance
Definition: STAT_GammaDistribution.cpp:69
virtual void copy(const STAT_Distribution &d)
copy the distribution
Definition: STAT_GammaDistribution.h:80
virtual tReal standardDeviation() const
compute the standard deviation
Definition: STAT_GammaDistribution.cpp:74
virtual tReal random() const
random return a random numbers in range
Definition: STAT_GammaDistribution.cpp:79
static SP::STAT_GammaDistribution New()
create a Gamma distibution
Definition: STAT_GammaDistribution.h:68
virtual void range(tReal &xmin, tReal &xmax) const
compute the range of the distribution
Definition: STAT_GammaDistribution.cpp:40
this class describes an array
Definition: CORE_Array.h:18
This class is the class to describes Gamma distribution.
Definition: STAT_GammaDistribution.h:16
This class is the class to describes general distribution.
Definition: STAT_Distribution.h:25
virtual tReal pdf(const tReal &x) const
compute the probability density function at x point
Definition: STAT_GammaDistribution.cpp:48
void getProperties(tReal &shape, tReal &scale) const
Definition: STAT_GammaDistribution.h:93
virtual tReal variance() const =0
compute the variance
boost::mt19937 RNGType
Definition: STAT_Distribution.h:23
virtual tReal mean() const
compute the mean
Definition: STAT_GammaDistribution.cpp:64
#define tReal
Definition: types.h:18
virtual SP::STAT_Distribution NewInstance() const
create a new instance of the distribution
Definition: STAT_GammaDistribution.h:73
STAT_GammaDistribution()
create an object
Definition: STAT_GammaDistribution.cpp:7
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106