1 #ifndef STAT_BinomialDistribution_H
2 #define STAT_BinomialDistribution_H
9 #include <boost/math/distributions/binomial.hpp>
10 #include <boost/random/binomial_distribution.hpp>
11 #include <boost/random/variate_generator.hpp>
31 boost::math::binomial_distribution<tReal> *mDistribution;
32 boost::random::binomial_distribution<int,tReal> *mRandomDistribution;
33 boost::random::variate_generator<
RNGType&,
34 boost::random::binomial_distribution<int,tReal> > *mGenerator;
61 inline static SP::STAT_BinomialDistribution
New(
const int& n,
const tReal& p) {
64 ptr->setProperties(n,p);
70 inline static SP::STAT_BinomialDistribution
New() {
This class is the class to describes Binomial distribution.
Definition: STAT_BinomialDistribution.h:20
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_BinomialDistribution New()
create a Binomial distibution
Definition: STAT_BinomialDistribution.h:70
virtual SP::STAT_Distribution NewInstance() const
create a new instance of the distribution
Definition: STAT_BinomialDistribution.h:75
virtual tReal cdfc(const tReal &x) const
compute the cumulative distribution complement function at x point
Definition: STAT_BinomialDistribution.cpp:59
virtual tReal mean() const =0
compute the mean
#define tBoolean
Definition: types.h:48
virtual void computeSample(const int &n, CORE_RealArray &sample) const
compute a sample of size n
Definition: STAT_BinomialDistribution.cpp:87
virtual void copy(const STAT_Distribution &d)
copy the distribution
Definition: STAT_BinomialDistribution.h:82
virtual void range(tReal &xmin, tReal &xmax) const
compute the range of the distribution
Definition: STAT_BinomialDistribution.cpp:40
virtual tReal variance() const
compute the variance
Definition: STAT_BinomialDistribution.cpp:70
virtual tReal mean() const
compute the mean
Definition: STAT_BinomialDistribution.cpp:65
static SP::STAT_BinomialDistribution New(const int &n, const tReal &p)
create a Binomial distibution
Definition: STAT_BinomialDistribution.h:61
this class describes an array
Definition: CORE_Array.h:18
virtual ~STAT_BinomialDistribution(void)
destroy an object.
Definition: STAT_BinomialDistribution.cpp:15
This class is the class to describes general distribution.
Definition: STAT_Distribution.h:25
virtual tReal cdf(const tReal &x) const
compute the cumulative distribution function at x point
Definition: STAT_BinomialDistribution.cpp:53
DEFINE_SPTR(STAT_BinomialDistribution)
virtual tReal variance() const =0
compute the variance
STAT_BinomialDistribution()
create an object
Definition: STAT_BinomialDistribution.cpp:6
virtual tReal random() const
random return a random numbers
Definition: STAT_BinomialDistribution.cpp:80
boost::mt19937 RNGType
Definition: STAT_Distribution.h:23
virtual tReal standardDeviation() const
compute the standard deviation
Definition: STAT_BinomialDistribution.cpp:75
virtual tReal pdf(const tReal &x) const
compute the probability density function at x point
Definition: STAT_BinomialDistribution.cpp:48
void setProperties(const int &n, const tReal &p)
Definition: STAT_BinomialDistribution.cpp:24
#define tReal
Definition: types.h:18
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106