12 #ifndef ROOT_TRandomGen 13 #define ROOT_TRandomGen 45 template<
class Engine>
54 fEngine.SetSeed(seed);
55 SetName(TString::Format(
"Random_%s",fEngine.Name().c_str() ) );
56 SetTitle(TString::Format(
"Random number generator: %s",fEngine.Name().c_str() ));
62 for (
int i = 0; i < n; ++i) array[i] =
fEngine();
65 for (
int i = 0; i < n; ++i) array[i] =
fEngine();
68 fEngine.SetSeed(seed);
80 #ifdef DEFINE_TEMPL_INSTANCE
TRandomGen< ROOT::Math::MixMaxEngine< 240, 0 > > TRandomMixMax
MIXMAX generator based on a state of N=240.
This is the base class for the ROOT Random number generators.
virtual void RndmArray(Int_t n, Float_t *array)
Return an array of n random numbers uniformly distributed in ]0,1].
TRandomGen< ROOT::Math::MixMaxEngine< 17, 0 > > TRandomMixMax17
MIXMAX generator based on a state of N=17.
virtual Double_t Rndm()
Machine independent random number generator.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
virtual Double_t Rndm()
Machine independent random number generator.
TRandomGen< ROOT::Math::StdEngine< std::mt19937_64 > > TRandomMT64
Generator based on a the Mersenne-Twister generator with 64 bits, using the implementation provided b...
TRandomGen(ULong_t seed=1)
TRandomGen< ROOT::Math::MixMaxEngine< 256, 2 > > TRandomMixMax256
MIXMAX generator based on a state of N=256, based on the generator descrived in this paper: ...
virtual void RndmArray(Int_t n, Double_t *array)
Return an array of n random numbers uniformly distributed in ]0,1].
TRandomGen< ROOT::Math::StdEngine< std::ranlux48 > > TRandomRanlux48
Generator based on a the RanLux generator with 48 bits, using the implementation provided by the stan...