Public Member Functions | List of all members
ibis::MersenneTwister Class Reference

Mersenne Twister. More...

#include <twister.h>

Inheritance diagram for ibis::MersenneTwister:
ibis::uniformRandomNumber

Public Member Functions

 MersenneTwister ()
 Constructor. More...
 
 MersenneTwister (unsigned seed)
 Constructor. Uses a user specified integer as seed.
 
unsigned next (unsigned r)
 Return integers in the range of [0, r)
 
unsigned next ()
 Generate the next random integer in the range of 0-(2^{32}-1).
 
double nextDouble ()
 
float nextFloat ()
 
int nextInt ()
 Next integer.
 
long nextLong ()
 
virtual double operator() ()
 Return a floating-point value in the range of [0, 1).
 
void setSeed (unsigned seed)
 Initializing the array with a seed.
 

Detailed Description

Mersenne Twister.

It generates uniform random numbers, which is further used in other random number generators.

Constructor & Destructor Documentation

ibis::MersenneTwister::MersenneTwister ( )
inline

Constructor.

This default constructor uses a value of the current time as the seed to initialize. Define FASTBIT_USE_DEV_URANDOM if one desires to initialize the random number generator with a more unpredictable seed.

References setSeed().


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

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive