Simpact Cyan
Population based event driven simulation using mNRM
gslrandomnumbergenerator.h
Go to the documentation of this file.
1 #ifndef GSLRANDOMNUMBERGENERATOR_H
2 
3 #define GSLRANDOMNUMBERGENERATOR_H
4 
9 #include <gsl/gsl_rng.h>
10 
16 {
17 public:
22 
24  GslRandomNumberGenerator(int seed);
26 
28  double pickRandomDouble();
29 
31  int pickRandomInt(int min, int max);
32 
35  unsigned int pickPoissonNumber(double lambda);
36 
39  double pickGaussianNumber(double mean, double sigma);
40 
43  double pickBetaNumber(double a, double b);
44 
46  double pickWeibull(double lambda, double kappa);
47 
50  double pickWeibull(double lambda, double kappa, double ageMin);
51 private:
52  gsl_rng *m_pRng;
53 };
54 
55 #endif // GSLRANDOMNUMBERGENERATOR_H
int pickRandomInt(int min, int max)
Chooses a random number from min to max (both are included).
Definition: gslrandomnumbergenerator.cpp:104
GslRandomNumberGenerator()
Initialize the random number generator with a random seed, A specific seed can still be forced by set...
Definition: gslrandomnumbergenerator.cpp:20
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:15
unsigned int pickPoissonNumber(double lambda)
Chooses a random number according to the Poisson distribution with parameter lambda.
Definition: gslrandomnumbergenerator.cpp:122
double pickBetaNumber(double a, double b)
Pick a random number from a beta distribution with a and b as values for and respectively.
Definition: gslrandomnumbergenerator.cpp:134
double pickGaussianNumber(double mean, double sigma)
Picks a random number from the gaussian distribution with parameters mean and sigma.
Definition: gslrandomnumbergenerator.cpp:127
double pickWeibull(double lambda, double kappa)
Picks a random number from a Weibull distribution with specified parameters.
Definition: gslrandomnumbergenerator.cpp:141
double pickRandomDouble()
Generate a random floating point number in the interval [0,1].
Definition: gslrandomnumbergenerator.cpp:97