ARTS
2.2.66
|
#include <rng.h>
Public Member Functions | |
Rng () | |
~Rng () | |
void | seed (unsigned long int n, const Verbosity &verbosity) |
void | force_seed (unsigned long int n) |
double | draw () |
unsigned long int | showseed () const |
Private Attributes | |
gsl_rng * | r |
unsigned long int | seed_no |
Rng::Rng | ( | ) |
Constructor creates instance of gsl_rng of type gsl_rng_mt19937
Definition at line 52 of file rng.cc.
References gsl_rng_alloc(), gsl_rng_mt19937, and r.
Rng::~Rng | ( | ) |
Destructor frees memory allocated to gsl_rng
Definition at line 61 of file rng.cc.
References gsl_rng_free(), and r.
double Rng::draw | ( | ) |
Draws a double from the uniform distribution [0,1)
Definition at line 120 of file rng.cc.
References gsl_rng_uniform(), and r.
Referenced by abs_lookupTestAccMC(), MCGeneral(), MCIPA(), mcPathTraceGeneral(), mcPathTraceIPA(), ran_gaussian(), and Sample_los().
void Rng::force_seed | ( | unsigned long int | n | ) |
void Rng::seed | ( | unsigned long int | n, |
const Verbosity & | verbosity | ||
) |
Seeds the Rng with the integer argument.
Every seed is only used once. The provided seed is increased by 1 until an unused seed is found.
Definition at line 72 of file rng.cc.
References CREATE_OUT0, gsl_rng_set(), r, and seed_no.
Referenced by abs_lookupTestAccMC(), IWCtopnd_MH97(), mc_IWP_cloud_opt_pathCalc(), MCGeneral(), and MCIPA().
unsigned long int Rng::showseed | ( | ) | const |
|
private |
Definition at line 571 of file rng.h.
Referenced by draw(), force_seed(), gsl_rng_alloc(), gsl_rng_clone(), Rng(), seed(), and ~Rng().
|
private |
Definition at line 573 of file rng.h.
Referenced by force_seed(), seed(), and showseed().