Random number generator

Files

file  random.h
 

random number generator of L'Ecuyer with Bays-Durham shuffle and added safeguards (numeric recipes)


Functions

double ran2 (long *idum)
 Long period (> 2.0e18) random number generator of L'Ecuyer with
Bays-Durham shuffle and added safeguards. Returns a uniform
random deviate between 0.0 and 1.0 (exclusive of the endpoints).
unsigned short random (long *seed, unsigned short max)
 returns a random value between zero and max, Long period (> 2.0e18) (see ran2())

Function Documentation

double ran2 ( long *  idum  ) 
Note:
probably cannot be inlined because of the static variables.

Definition at line 102 of file random.h.

References AM, IA1, IA2, IM1, IM2, IMM1, IQ1, IQ2, IR1, IR2, NDIV, NTAB, and RNMX.

Referenced by random(), and randomUInt32().

unsigned short random ( long *  seed,
unsigned short  max 
) [inline]
Generated on Tue Nov 23 13:10:52 2010 for centerfocus by  doxygen 1.6.3