Logo ROOT  
Reference Guide
No Matches
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Author: Rene Brun 04/03/99
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 *************************************************************************/
12#ifndef ROOT_TRandom1
13#define ROOT_TRandom1
18// //
19// TRandom1 //
20// //
21// Ranlux random number generator class (periodicity > 10**14) //
22// //
25#include "TRandom.h"
27class TRandom1 : public TRandom {
40 const UInt_t *fTheSeeds; //! Temporary array of seed values (transient)
45 TRandom1();
46 TRandom1(UInt_t seed, Int_t lux = 3 );
47 TRandom1(Int_t rowIndex, Int_t colIndex, Int_t lux );
48 ~TRandom1() override;
49 virtual Int_t GetLuxury() const {return fLuxury;}
50 // Get the current seed (first element of the table)
51 UInt_t GetSeed() const override { return UInt_t ( fFloatSeedTable[0] / fMantissaBit24 ) ; }
52 // Gets the current seed.
53 const UInt_t *GetTheSeeds() const {return fTheSeeds;}
54 // Gets the current array of seeds.
55 static void GetTableSeeds(UInt_t* seeds, Int_t index);
56 // Gets back seed values stored in the table, given the index.
57 using TRandom::Rndm;
58 Double_t Rndm( ) override;
59 void RndmArray(Int_t size, Float_t *vect) override;
60 void RndmArray(Int_t size, Double_t *vect) override;
61 virtual void SetSeed2(UInt_t seed, Int_t lux=3);
62 // Sets the state of the algorithm according to seed.
63 virtual void SetSeeds(const UInt_t * seeds, Int_t lux=3);
64 // Sets the state of the algorithm according to the zero terminated
65 // array of seeds. Only the first seed is used.
66 void SetSeed(ULong_t seed) override;
68 ClassDefOverride(TRandom1,2) //Ranlux Random number generators with periodicity > 10**14
#define R__EXTERN
Definition DllImport.h:27
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Definition RtypesCore.h:45
unsigned long ULong_t
Definition RtypesCore.h:55
unsigned int UInt_t
Definition RtypesCore.h:46
float Float_t
Definition RtypesCore.h:57
double Double_t
Definition RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
R__EXTERN TRandom * gRandom
Definition TRandom1.h:71
The Ranlux Random number generator class.
Definition TRandom1.h:27
const Double_t fMantissaBit12
Definition TRandom1.h:42
Float_t fFloatSeedTable[24]
Definition TRandom1.h:35
default constructor
Definition TRandom1.cxx:287
Int_t fIlag
Definition TRandom1.h:32
void RndmArray(Int_t size, Float_t *vect) override
return an array of random numbers in ]0,1]
Definition TRandom1.cxx:413
Int_t fNskip
Definition TRandom1.h:30
Int_t fCount24
Definition TRandom1.h:34
~TRandom1() override
Definition TRandom1.cxx:341
Double_t Rndm() override
return a random number in ]0,1]
Definition TRandom1.cxx:360
const UInt_t * fTheSeeds
Definition TRandom1.h:40
Int_t fJlag
Definition TRandom1.h:33
static Int_t fgMaxIndex
Definition TRandom1.h:39
void SetSeed(ULong_t seed) override
Set the state of the generator providing a single seed value and using the luxury level defined when ...
Definition TRandom1.cxx:598
virtual Int_t GetLuxury() const
Definition TRandom1.h:49
const UInt_t * GetTheSeeds() const
Definition TRandom1.h:53
UInt_t GetSeed() const override
Get the random generator seed.
Definition TRandom1.h:51
Float_t fCarry
Definition TRandom1.h:36
const Double_t fMantissaBit24
Temporary array of seed values (transient)
Definition TRandom1.h:41
const Int_t fIntModulus
Definition TRandom1.h:37
virtual void SetSeeds(const UInt_t *seeds, Int_t lux=3)
Set the state of the generator providing an array of seeds The array of seeds can be of size 24 or le...
Definition TRandom1.cxx:487
virtual void SetSeed2(UInt_t seed, Int_t lux=3)
Set the state of the generator providing a single seed value and a luxury level.
Definition TRandom1.cxx:568
static void GetTableSeeds(UInt_t *seeds, Int_t index)
static function returning the table of seeds
Definition TRandom1.cxx:348
static Int_t fgNumEngines
Definition TRandom1.h:38
Int_t fLuxury
Definition TRandom1.h:31
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
Double_t Rndm() override
Machine independent random number generator.
Definition TRandom.cxx:552