Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Random.h File Reference


Detailed Description

Random number generators: uniform and standard normal. Uniform reals are based on the Mersenne Twister taken from A C-program for MT19937. See also Matsumoto.

Definition in file Random.h.

#include "TypedefsMacros.h"

Go to the source code of this file.

Compounds

class  MersenneTwister

Defines

#define MT_N   624
#define MT_M   397
#define MT_D   227
#define MATRIX_A   0x9908b0df
#define UPPER_MASK   0x80000000
#define LOWER_MASK   0x7fffffff
#define TEMPERING_MASK_B   0x9d2c5680
#define TEMPERING_MASK_C   0xefc60000
#define TEMPERING_SHIFT_U(y)   (y >> 11)
#define TEMPERING_SHIFT_S(y)   (y << 7)
#define TEMPERING_SHIFT_T(y)   (y << 15)
#define TEMPERING_SHIFT_L(y)   (y >> 18)

Functions

int sign ()
Real N (Real x)
Real nInverse (Real x)
Real U01 ()
int Uint (int n)
Real sTN ()


Define Documentation

#define MT_N   624
 

Definition at line 31 of file Random.h.

#define MT_M   397
 

Definition at line 32 of file Random.h.

#define MT_D   227
 

Definition at line 33 of file Random.h.

#define MATRIX_A   0x9908b0df
 

Definition at line 34 of file Random.h.

#define UPPER_MASK   0x80000000
 

Definition at line 35 of file Random.h.

#define LOWER_MASK   0x7fffffff
 

Definition at line 36 of file Random.h.

#define TEMPERING_MASK_B   0x9d2c5680
 

Definition at line 39 of file Random.h.

#define TEMPERING_MASK_C   0xefc60000
 

Definition at line 40 of file Random.h.

#define TEMPERING_SHIFT_U      (y >> 11)
 

Definition at line 41 of file Random.h.

#define TEMPERING_SHIFT_S      (y << 7)
 

Definition at line 42 of file Random.h.

#define TEMPERING_SHIFT_T      (y << 15)
 

Definition at line 43 of file Random.h.

#define TEMPERING_SHIFT_L      (y >> 18)
 

Definition at line 44 of file Random.h.


Function Documentation

int sign  
 

Random draw from {1,-1}

Real N Real    x
 

Cumulative normal distribution function

Real nInverse Real    x
 

Inverse normal cumulative distribution function

Real U01  
 

Uniform (0,1) real based on MT19937.

int Uint int    n
 

Uniform random integers in [0,n-1)

Real sTN  
 

Standard normal deviate based on MT19937 and nInverse().


Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by doxygen1.3-rc3