Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

random.h File Reference

Uniformly distributed random numbers using the 32-bit generator of L'Ecuyer, P. More...

Go to the source code of this file.

Functions

void uniform_init (int S1, int S2)
 Initialises the uniform random number generator with two seeds. More...

int int_uniform (void)
 Returns a uniformly distributed integer in the range [0 .. More...

double dbl_uniform (void)
 Returns a uniformly distributed real value between [0.0 .. More...

double random_gauss (void)
 Returns a random number distributed as Standard Normal.


Detailed Description

Uniformly distributed random numbers using the 32-bit generator of L'Ecuyer, P.

Efficient and portable combined random number generators, C.A.C.M., vol. 31, 742-749, June 1988. Period is very long, about 2.3e18. Plus the Box/Mueller method for standard normal variates.

Author(s):
Andras Aszodi
Date:
20-Nov-2001.

Definition in file random.h.


Function Documentation

void uniform_init ( int S1,
int S2 )
 

Initialises the uniform random number generator with two seeds.

If S1==0, then the value returned by getpid() is used instead. If S2==0, then the value returned by time(NULL) is used instead.

int int_uniform ( void )
 

Returns a uniformly distributed integer in the range [0 ..

2147483563].

double dbl_uniform ( void )
 

Returns a uniformly distributed real value between [0.0 ..

1.0].

double random_gauss ( void )
 

Returns a random number distributed as Standard Normal.


Generated at Wed Aug 21 09:33:30 2002 for The Razorback C Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001