Simpact Cyan
Population based event driven simulation using mNRM
|
This class allows you to generate random numbers, and uses the GNU Scientific Library for this. More...
#include <gslrandomnumbergenerator.h>
Public Member Functions | |
GslRandomNumberGenerator () | |
Initialize the random number generator with a random seed, A specific seed can still be forced by setting the MNRM_DEBUG_SEED environment variable (can be useful for testing purposes). | |
GslRandomNumberGenerator (int seed) | |
Initialize the random number generator with a specific seed. | |
unsigned long | getSeed () const |
Returns the seed used for the random number generator. | |
double | pickRandomDouble () |
Generate a random floating point number in the interval [0,1]. | |
int | pickRandomInt (int min, int max) |
Chooses a random number from min to max (both are included). | |
unsigned int | pickPoissonNumber (double lambda) |
Chooses a random number according to the Poisson distribution with parameter lambda . | |
unsigned int | pickBinomialNumber (double p, unsigned int n) |
Pick a random number from the binomial distribution, for n trials with a probability of success p for each trial. | |
double | pickGaussianNumber (double mean, double sigma) |
Picks a random number from the gaussian distribution with parameters mean and sigma . | |
double | pickBetaNumber (double a, double b) |
Pick a random number from a beta distribution with a and b as values for and respectively. | |
double | pickWeibull (double lambda, double kappa) |
Picks a random number from a Weibull distribution with specified parameters. | |
double | pickWeibull (double lambda, double kappa, double ageMin) |
Picks a random number from a distribution which has a Weibull shape with specified parameters above ageMin , and which is zero below that age. | |
double | pickLogNorm (double zeta, double sigma) |
Picks a random number from a log-normal distribution with parameters zeta and sigma . | |
double | pickGamma (double a, double b) |
Picks a random number from the gamma distribution with a and b defined as in the formula prob(x) = x^(a-1)*exp(-x/b)/(b^a * Gamma(a)) . | |
std::pair< double, double > | pickBivariateGaussian (double muX, double muY, double sigmaX, double sigmaY, double rho) |
Picks a random number from a two dimensional gaussian distribution with specified parameters (rho is the correlation coefficient). | |
This class allows you to generate random numbers, and uses the GNU Scientific Library for this.