NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

planck_rng Class Reference

#include <planck_rng.h>

List of all members.

Public Member Functions

 planck_rng (unsigned int x1=123456789, unsigned int y1=362436069, unsigned int z1=521288629, unsigned int w1=88675123)
void seed (unsigned int x1=123456789, unsigned int y1=362436069, unsigned int z1=521288629, unsigned int w1=88675123)
unsigned int int_rand_uni ()
double rand_uni ()
double rand_gauss ()
double rand_exp ()


Detailed Description

C++ port of the xorshift generator xor128() described in Marsaglia, Journal of Statistical Software 2003, vol 8. It has a period of 2^128 - 1.

Definition at line 47 of file planck_rng.h.


Constructor & Destructor Documentation

planck_rng::planck_rng ( unsigned int  x1 = 123456789,
unsigned int  y1 = 362436069,
unsigned int  z1 = 521288629,
unsigned int  w1 = 88675123 
) [inline]

Initializes the generator with 0 to 4 seed values.

Definition at line 82 of file planck_rng.h.


Member Function Documentation

void planck_rng::seed ( unsigned int  x1 = 123456789,
unsigned int  y1 = 362436069,
unsigned int  z1 = 521288629,
unsigned int  w1 = 88675123 
) [inline]

Re-initializes the generator with 0 to 4 seed values.

Definition at line 92 of file planck_rng.h.

unsigned int planck_rng::int_rand_uni (  )  [inline]

Returns uniformly distributed random integer numbers from the interval [0;0xFFFFFFFF].

Definition at line 102 of file planck_rng.h.

double planck_rng::rand_uni (  )  [inline]

Returns uniformly distributed random numbers from the interval [0;1[.

Definition at line 113 of file planck_rng.h.

double planck_rng::rand_gauss (  )  [inline]

Returns random numbers with Gaussian distribution (mean=0, sigma=1).

Uses rand_uni() internally.

Definition at line 120 of file planck_rng.h.

double planck_rng::rand_exp (  )  [inline]

Returns exponentially distributed random numbers (mean=1, nonnegative).

Uses rand_uni() internally.

Definition at line 147 of file planck_rng.h.


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

Generated on Fri Jun 18 16:12:29 2010 for LevelS C++ support library
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650