ROOT
6.07/01
Reference Guide
|
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>
Definition at line 52 of file MersenneTwisterEngine.h.
|
inline |
Definition at line 54 of file MersenneTwisterEngine.h.
|
inlinevirtual |
Definition at line 58 of file MersenneTwisterEngine.h.
|
inline |
Definition at line 68 of file MersenneTwisterEngine.h.
|
inline |
Definition at line 66 of file MersenneTwisterEngine.h.
|
inlinevirtual |
Implements ROOT::Math::RandomBaseEngine.
Definition at line 63 of file MersenneTwisterEngine.h.
|
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().
|
private |
Definition at line 80 of file MersenneTwisterEngine.h.
Referenced by Rndm_impl(), and SetSeed().
|
private |
Definition at line 79 of file MersenneTwisterEngine.h.
Referenced by Rndm_impl(), and SetSeed().