Simpact Cyan
Population based event driven simulation using mNRM
lognormaldistribution.h
Go to the documentation of this file.
1 #ifndef LOGNORMALDISTRIBUTION_H
2 
3 #define LOGNORMALDISTRIBUTION_H
4 
11 
18 {
19 public:
21  LogNormalDistribution(double zeta, double sigma, GslRandomNumberGenerator *pRng);
22 
23  double pickNumber() const;
24  double getZeta() const { return m_zeta; }
25  double getSigma() const { return m_sigma; }
26 private:
27  double m_zeta, m_sigma;
28 };
29 
31 {
32  m_zeta = zeta;
33  m_sigma = sigma;
34 }
35 
36 inline double LogNormalDistribution::pickNumber() const
37 {
38  return getRandomNumberGenerator()->pickLogNorm(m_zeta, m_sigma);
39 }
40 
41 #endif // LOGNORMALDISTRIBUTION_H
42 
double pickNumber() const
Pick a number according to a specific distrubution, specified in a subclass of ProbabilityDistributio...
Definition: lognormaldistribution.h:36
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:16
double pickLogNorm(double zeta, double sigma)
Picks a random number from a log-normal distribution with parameters zeta and sigma.
Definition: gslrandomnumbergenerator.cpp:163
LogNormalDistribution(double zeta, double sigma, GslRandomNumberGenerator *pRng)
The constructor specifies parameters for a log-normal distribution.
Definition: lognormaldistribution.h:30
This class allows you to return a random number from a log-normal distribution with parameters specif...
Definition: lognormaldistribution.h:17
Abstract base class for probability distribution implementations so that they can be used interchange...
Definition: probabilitydistribution.h:15