SphinxBase  5prealpha
genrand.h File Reference

High performance prortable random generator created by Takuji Nishimura and Makoto Matsumoto. More...

#include <stdio.h>
#include <sphinxbase/sphinxbase_export.h>

Go to the source code of this file.

Macros

#define S3_RAND_MAX_INT32   0x7fffffff
 
#define s3_rand_seed(s)   genrand_seed(s);
 Macros to simplify calling of random generator function.
 
#define s3_rand_int31()   genrand_int31()
 
#define s3_rand_real()   genrand_real3()
 
#define s3_rand_res53()   genrand_res53()
 

Functions

SPHINXBASE_EXPORT void genrand_seed (unsigned long s)
 Initialize the seed of the random generator.
 
SPHINXBASE_EXPORT long genrand_int31 (void)
 generates a random number on [0,0x7fffffff]-interval
 
SPHINXBASE_EXPORT double genrand_real3 (void)
 generates a random number on (0,1)-real-interval
 
SPHINXBASE_EXPORT double genrand_res53 (void)
 generates a random number on [0,1) with 53-bit resolution
 

Detailed Description

High performance prortable random generator created by Takuji Nishimura and Makoto Matsumoto.

A high performance which applied Mersene twister primes to generate random number. If probably seeded, the random generator can achieve 19937-bits period. For technical detail. Please take a look at (FIXME! Need to search for the web site.) http://www.

Definition in file genrand.h.