00001 // @(#)root/mathcore:$Id: TRandom3.h 22866 2008-03-27 15:32:50Z rdm $ 00002 // Author: Peter Malzacher 31/08/99 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TRandom3 00013 #define ROOT_TRandom3 00014 00015 00016 00017 ////////////////////////////////////////////////////////////////////////// 00018 // // 00019 // TRandom3 // 00020 // // 00021 // random number generator class: Mersenne Twistor // 00022 // // 00023 ////////////////////////////////////////////////////////////////////////// 00024 00025 #ifndef ROOT_TRandom 00026 #include "TRandom.h" 00027 #endif 00028 00029 class TRandom3 : public TRandom { 00030 00031 private: 00032 UInt_t fMt[624]; 00033 Int_t fCount624; 00034 00035 public: 00036 TRandom3(UInt_t seed=4357); 00037 virtual ~TRandom3(); 00038 virtual Double_t Rndm(Int_t i=0); 00039 virtual void RndmArray(Int_t n, Float_t *array); 00040 virtual void RndmArray(Int_t n, Double_t *array); 00041 virtual void SetSeed(UInt_t seed=0); 00042 00043 ClassDef(TRandom3,2) //Random number generator: Mersenne Twistor 00044 }; 00045 00046 R__EXTERN TRandom *gRandom; 00047 00048 #endif