1 #ifndef STAT_NormalDistribution_H
2 #define STAT_NormalDistribution_H
5 #include <boost/math/distributions/normal.hpp>
6 #include <boost/random/normal_distribution.hpp>
7 #include <boost/random/variate_generator.hpp>
26 boost::math::normal_distribution<tReal> *mDistribution;
27 boost::random::normal_distribution<tReal> *mRandomDistribution;
28 boost::random::variate_generator<
RNGType&,
29 boost::random::normal_distribution<tReal> > *mGenerator;
62 p->setProperties(mean,sd);
67 inline static SP::STAT_NormalDistribution
New() {
virtual tReal variance() const
compute the variance
Definition: STAT_NormalDistribution.cpp:69
virtual void computeSample(const int &n, CORE_RealArray &sample) const
compute a sample of size n
Definition: STAT_NormalDistribution.cpp:90
virtual tReal cdf(const tReal &x) const
compute the cumulative distribution function at x point
Definition: STAT_NormalDistribution.cpp:53
DEFINE_SPTR(STAT_NormalDistribution)
virtual tReal random() const
random return a random numbers in range
Definition: STAT_NormalDistribution.cpp:84
virtual tReal pdf(const tReal &x) const
compute the probability density function at x point
Definition: STAT_NormalDistribution.cpp:48
This class is the class to describes Normal distribution.
Definition: STAT_NormalDistribution.h:17
virtual tReal mean() const =0
compute the mean
#define tBoolean
Definition: types.h:48
virtual tReal mean() const
compute the mean
Definition: STAT_NormalDistribution.cpp:64
static SP::STAT_NormalDistribution New(const tReal &mean, const tReal &sd)
create a Normal distibution
Definition: STAT_NormalDistribution.h:58
virtual tReal standardDeviation() const
compute the standard deviation
Definition: STAT_NormalDistribution.cpp:74
static SP::STAT_NormalDistribution New()
create a Normal distibution
Definition: STAT_NormalDistribution.h:67
virtual tReal quantile(const tReal &q) const
quantile
Definition: STAT_NormalDistribution.cpp:79
virtual tReal computeGrowthRate()
return the growth rate of the distribution such that Esperance(E(exp(-z*X)))=2
Definition: STAT_NormalDistribution.h:141
virtual tReal adjustGrowthRate(const tReal &rho)
adjuste the parameters of the distribution such that growth rate is rho
Definition: STAT_NormalDistribution.h:146
this class describes an array
Definition: CORE_Array.h:18
virtual void range(tReal &xmin, tReal &xmax) const
compute the range of the distribution
Definition: STAT_NormalDistribution.cpp:40
void setProperties(const tReal &mean, const tReal &sd)
Definition: STAT_NormalDistribution.cpp:24
virtual tReal cdfc(const tReal &x) const
compute the cumulative distribution complement function at x point
Definition: STAT_NormalDistribution.cpp:59
This class is the class to describes general distribution.
Definition: STAT_Distribution.h:25
virtual void copy(const STAT_Distribution &d)
copy the distribution
Definition: STAT_NormalDistribution.h:79
STAT_NormalDistribution()
create an object
Definition: STAT_NormalDistribution.cpp:6
boost::mt19937 RNGType
Definition: STAT_Distribution.h:23
virtual tReal standardDeviation() const =0
compute the standard deviation
#define tReal
Definition: types.h:18
virtual SP::STAT_Distribution NewInstance() const
create a new instance of the distribution
Definition: STAT_NormalDistribution.h:72
virtual ~STAT_NormalDistribution(void)
destroy an object.
Definition: STAT_NormalDistribution.cpp:15
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106