library: libCore
#include "TRandom3.h"


class description - source file - inheritance tree (.pdf)

class TRandom3 : public TRandom

Inheritance Chart:

TRandom3(UInt_t seed = 65539) TRandom3(const TRandom3&) virtual ~TRandom3() static TClass* Class() virtual TClass* IsA() const TRandom3& operator=(const TRandom3&) virtual Double_t Rndm(Int_t i = 0) virtual void RndmArray(Int_t n, Float_t* array) virtual void RndmArray(Int_t n, Double_t* array) virtual void SetSeed(UInt_t seed = 0) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

UInt_t fMt[624] Int_t fCount624

Class Description


 Random number generator class based on
   M. Matsumoto and T. Nishimura,
   Mersenne Twistor: 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 Twistor homepage

 Advantage: large period 2**19937-1
            relativly fast
              (only two times slower than TRandom, but
               two times faster than TRandom2)
 Drawback:  a relative large internal state of 624 integers

 Aug.99 ROOT implementation based on CLHEP by P.Malzacher

 the original code contains the following copyright notice:

TRandom3(UInt_t seed)
*-*-*-*-*-*-*-*-*-*-*default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 If seed is 0, the seed is automatically computed via a TUUID object.
 In this case the seed is guaranteed to be unique in space and time.

*-*-*-*-*-*-*-*-*-*-*default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==================

Double_t Rndm(Int_t)
  Machine independent random number generator.
  Produces uniformly-distributed floating points in [0,1]
  Method: Mersenne Twistor

void RndmArray(Int_t n, Float_t *array)
 Return an array of n random numbers uniformly distributed in ]0,1]

void RndmArray(Int_t n, Double_t *array)
 Return an array of n random numbers uniformly distributed in ]0,1]

void SetSeed(UInt_t seed)
  Set the random generator sequence
 if seed is 0 (default value) a TUUID is generated and used to fill
 the first 8 integers of the seed array.
 In this case the seed is guaranteed to be unique in space and time.

void Streamer(TBuffer &R__b)
 Stream an object of class TRandom3.

Inline Functions

            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void StreamerNVirtual(TBuffer& b)
           TRandom3 TRandom3(const TRandom3&)
          TRandom3& operator=(const TRandom3&)

Author: Peter Malzacher 31/08/99
Last update: root/base:$Name: $:$Id: TRandom3.cxx,v 1.7 2005/06/21 10:45:42 brun Exp $

ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.