Logo ROOT   6.08/07
Reference Guide
TRandom2.h
Go to the documentation of this file.
1 // @(#)root/mathcore:$Id$
2 // Author: Rene Brun 04/03/99
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TRandom2
13 #define ROOT_TRandom2
14 
15 
16 
17 //////////////////////////////////////////////////////////////////////////
18 // //
19 // TRandom2 //
20 // //
21 // random number generator class (periodicity > 10**26) //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_TRandom
26 #include "TRandom.h"
27 #endif
28 
29 class TRandom2 : public TRandom {
30 
31 protected:
32  UInt_t fSeed1; //Random number generator seed 1
33  UInt_t fSeed2; //Random number generator seed 2
34 
35 public:
36  TRandom2(UInt_t seed=1);
37  virtual ~TRandom2();
38  virtual Double_t Rndm( );
39  using TRandom::Rndm;
40  virtual void RndmArray(Int_t n, Float_t *array);
41  virtual void RndmArray(Int_t n, Double_t *array);
42  virtual void SetSeed(ULong_t seed=0);
43 
44  ClassDef(TRandom2,1) //Random number generator with periodicity of 10**26
45 };
46 
48 
49 #endif
float Float_t
Definition: RtypesCore.h:53
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
Definition: TRandom2.h:29
UInt_t fSeed2
Definition: TRandom2.h:33
virtual void SetSeed(ULong_t seed=0)
Set the generator seed.
Definition: TRandom2.cxx:122
UInt_t fSeed1
Definition: TRandom2.h:32
int Int_t
Definition: RtypesCore.h:41
virtual ~TRandom2()
-*-*-*-*-*-*-*-*-*-*default destructor-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ================== ...
Definition: TRandom2.cxx:48
#define ClassDef(name, id)
Definition: Rtypes.h:254
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:31
virtual Double_t Rndm()
Machine independent random number generator.
Definition: TRandom.cxx:512
virtual void RndmArray(Int_t n, Float_t *array)
Return an array of n random numbers uniformly distributed in ]0,1].
Definition: TRandom2.cxx:77
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual Double_t Rndm()
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
Definition: TRandom2.cxx:58
double Double_t
Definition: RtypesCore.h:55
unsigned long ULong_t
Definition: RtypesCore.h:51
R__EXTERN TRandom * gRandom
Definition: TRandom2.h:47
TRandom2(UInt_t seed=1)
-*-*-*-*-*-*-*-*-*-*default constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* =================== ...
Definition: TRandom2.cxx:37
#define R__EXTERN
Definition: DllImport.h:27
const Int_t n
Definition: legend1.C:16