ROOT
master
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
#include "
TRandom.h
"
26
27
class
TRandom2
:
public
TRandom
{
28
29
protected
:
30
UInt_t
fSeed1
;
//Random number generator seed 1
31
UInt_t
fSeed2
;
//Random number generator seed 2
32
33
public
:
34
TRandom2
(
UInt_t
seed=1);
35
virtual
~TRandom2
();
36
virtual
Double_t
Rndm
( );
37
using
TRandom::Rndm
;
38
virtual
void
RndmArray
(
Int_t
n
,
Float_t
*array);
39
virtual
void
RndmArray
(
Int_t
n
,
Double_t
*array);
40
virtual
void
SetSeed
(
ULong_t
seed=0);
41
42
ClassDef
(
TRandom2
,1)
//Random number generator with periodicity of 10**26
43
};
44
45
R__EXTERN
TRandom
*
gRandom
;
46
47
#endif
n
const Int_t n
Definition:
legend1.C:16
TRandom2::fSeed2
UInt_t fSeed2
Definition:
TRandom2.h:31
TRandom.h
Float_t
float Float_t
Definition:
RtypesCore.h:57
TRandom2::Rndm
virtual Double_t Rndm()
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...
Definition:
TRandom2.cxx:56
TRandom2::fSeed1
UInt_t fSeed1
Definition:
TRandom2.h:30
gRandom
R__EXTERN TRandom * gRandom
Definition:
TRandom2.h:45
TRandom
This is the base class for the ROOT Random number generators.
Definition:
TRandom.h:27
TRandom2
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
Definition:
TRandom2.h:27
TRandom::Rndm
virtual Double_t Rndm()
Machine independent random number generator.
Definition:
TRandom.cxx:552
ULong_t
unsigned long ULong_t
Definition:
RtypesCore.h:55
TRandom2::TRandom2
TRandom2(UInt_t seed=1)
Default constructor.
Definition:
TRandom2.cxx:36
unsigned int
TRandom2::SetSeed
virtual void SetSeed(ULong_t seed=0)
Set the generator seed.
Definition:
TRandom2.cxx:123
Double_t
double Double_t
Definition:
RtypesCore.h:59
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:325
TRandom2::~TRandom2
virtual ~TRandom2()
Default destructor.
Definition:
TRandom2.cxx:46
R__EXTERN
#define R__EXTERN
Definition:
DllImport.h:27
TRandom2::RndmArray
virtual void RndmArray(Int_t n, Float_t *array)
Return an array of n random numbers uniformly distributed in ]0,1].
Definition:
TRandom2.cxx:75
int
math
mathcore
inc
TRandom2.h
ROOT master - Reference Guide Generated on Wed Apr 14 2021 11:14:15 (GVA Time) using Doxygen 1.9.0