ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::MersenneTwisterEngine Class Reference

Random number generator class based on M.

Matsumoto and T. Nishimura, Mersenne Twister: A 623-diminsionally equidistributed uniform pseudorandom number generator ACM Transactions on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3–30.

For more information see the Mersenne Twister homepage [http://www.math.keio.ac.jp/~matumoto/emt.html]

Advantage:

Drawback: a relative large internal state of 624 integers

Definition at line 47 of file MersenneTwisterEngine.h.

Public Types

typedef TRandomEngine BaseType
 

Public Member Functions

 MersenneTwisterEngine (unsigned int seed=4357)
 
virtual ~MersenneTwisterEngine ()
 
void SetSeed (unsigned int seed)
 set the seed x More...
 
virtual double Rndm ()
 
double operator() ()
 
unsigned int IntRndm ()
 
- Public Member Functions inherited from ROOT::Math::TRandomEngine
virtual ~TRandomEngine ()
 
- Public Member Functions inherited from ROOT::Math::RandomBaseEngine
virtual ~RandomBaseEngine ()
 

Private Member Functions

double Rndm_impl ()
 generate a random double number More...
 

Private Attributes

uint32_t fMt [624]
 
int fCount624
 

#include <Math/MersenneTwisterEngine.h>

Inheritance diagram for ROOT::Math::MersenneTwisterEngine:
[legend]

Member Typedef Documentation

Definition at line 52 of file MersenneTwisterEngine.h.

Constructor & Destructor Documentation

ROOT::Math::MersenneTwisterEngine::MersenneTwisterEngine ( unsigned int  seed = 4357)
inline

Definition at line 54 of file MersenneTwisterEngine.h.

virtual ROOT::Math::MersenneTwisterEngine::~MersenneTwisterEngine ( )
inlinevirtual

Definition at line 58 of file MersenneTwisterEngine.h.

Member Function Documentation

unsigned int ROOT::Math::MersenneTwisterEngine::IntRndm ( )
inline

Definition at line 68 of file MersenneTwisterEngine.h.

double ROOT::Math::MersenneTwisterEngine::operator() ( )
inline

Definition at line 66 of file MersenneTwisterEngine.h.

virtual double ROOT::Math::MersenneTwisterEngine::Rndm ( )
inlinevirtual

Implements ROOT::Math::RandomBaseEngine.

Definition at line 63 of file MersenneTwisterEngine.h.

double ROOT::Math::MersenneTwisterEngine::Rndm_impl ( )
private

generate a random double number

Definition at line 37 of file MersenneTwisterEngine.cxx.

Referenced by IntRndm(), operator()(), Rndm(), and Rndm_impl().

void ROOT::Math::MersenneTwisterEngine::SetSeed ( unsigned int  seed)

set the seed x

Definition at line 24 of file MersenneTwisterEngine.cxx.

Referenced by MersenneTwisterEngine().

Member Data Documentation

int ROOT::Math::MersenneTwisterEngine::fCount624
private

Definition at line 80 of file MersenneTwisterEngine.h.

Referenced by Rndm_impl(), and SetSeed().

uint32_t ROOT::Math::MersenneTwisterEngine::fMt[624]
private

Definition at line 79 of file MersenneTwisterEngine.h.

Referenced by Rndm_impl(), and SetSeed().

Collaboration diagram for ROOT::Math::MersenneTwisterEngine:
[legend]

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