Rng Class Reference

#include <rng.h>

Collaboration diagram for Rng:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Rng ()
 ~Rng ()
void seed (unsigned long int n)
double draw ()
unsigned long int showseed ()

Private Attributes

gsl_rngr
unsigned long int seed_no


Detailed Description

Definition at line 567 of file rng.h.


Constructor & Destructor Documentation

Rng::Rng (  ) 

Constructor creates instance of gsl_rng of type gsl_rng_mt19937

Definition at line 43 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 52 of file rng.cc.

References gsl_rng_free(), and r.


Member Function Documentation

void Rng::seed ( unsigned long int  n  ) 

Seeds the Rng with the integer argument. If no argument is given the Rng is seeded using the system time (number of seconds since 1-1-1970)

Definition at line 61 of file rng.cc.

References gsl_rng_set(), r, and seed_no.

Referenced by mc_IWP_cloud_opt_pathCalc(), MCGeneral(), MCIPA(), and ScatteringMonteCarlo().

double Rng::draw (  ) 

Draws a double from the uniform distribution [0,1)

Definition at line 71 of file rng.cc.

References gsl_rng_uniform(), and r.

Referenced by MCGeneral(), MCIPA(), mcPathTrace(), mcPathTraceGeneral(), mcPathTraceIPA(), ran_gaussian(), Sample_los(), Sample_ppathlengthLOS(), and ScatteringMonteCarlo().

unsigned long int Rng::showseed (  ) 

Returns the seed number

Definition at line 80 of file rng.cc.

References seed_no.


Member Data Documentation

gsl_rng* Rng::r [private]

Definition at line 569 of file rng.h.

Referenced by draw(), gsl_rng_alloc(), gsl_rng_clone(), Rng(), seed(), and ~Rng().

unsigned long int Rng::seed_no [private]

Definition at line 571 of file rng.h.

Referenced by seed(), and showseed().


The documentation for this class was generated from the following files:

Generated on Mon Mar 23 14:07:02 2009 for ARTS by  doxygen 1.5.6