Logo ROOT  
Reference Guide
GSLRndmEngines.h
Go to the documentation of this file.
1 // @(#)root/mathmore:$Id$
2 // Author: L. Moneta, A. Zsenei 08/2005
3 
4  /**********************************************************************
5  * *
6  * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT *
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License *
10  * as published by the Free Software Foundation; either version 2 *
11  * of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this library (see file COPYING); if not, write *
20  * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21  * 330, Boston, MA 02111-1307 USA, or contact the author. *
22  * *
23  **********************************************************************/
24 
25 // Header file for class GSLRandom
26 //
27 // Created by: moneta at Sun Nov 21 16:26:03 2004
28 //
29 // Last update: Sun Nov 21 16:26:03 2004
30 //
31 #ifndef ROOT_Math_GSLRndmEngines
32 #define ROOT_Math_GSLRndmEngines
33 
34 #include <string>
35 #include <vector>
36 
37 
38 namespace ROOT {
39 namespace Math {
40 
41 
42  class GSLRngWrapper;
43  class GSLMCIntegrator;
44 
45  //_________________________________________________________________
46  /**
47  GSLRandomEngine
48  Base class for all GSL random engines,
49  normally user instantiate the derived classes
50  which creates internally the generator.
51 
52  The main GSL generators (see
53  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">
54  here</A>) are available as derived classes
55  In addition to generate uniform numbers it provides method for
56  generating numbers according to pre-defined distributions
57  using the GSL functions from
58  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">
59  GSL random number distributions</A>.
60 
61 
62 
63  @ingroup Random
64  */
66 
67  friend class GSLMCIntegrator;
68 
69  public:
70 
71  /**
72  default constructor. No creation of rng is done.
73  If then Initialize() is called an engine is created
74  based on default GSL type (MT)
75  */
77 
78  /**
79  create from an existing rng.
80  User manage the rng pointer which is then deleted olny by calling Terminate()
81  */
83 
84  /**
85  Copy constructor : clone the contained GSL generator
86  */
87  GSLRandomEngine(const GSLRandomEngine & eng);
88 
89  /**
90  Assignment operator : make a deep copy of the contained GSL generator
91  */
93 
94  /**
95  initialize the generator
96  If no rng is present the default one based on Mersenne and Twister is created
97  */
98  void Initialize();
99 
100  /**
101  delete pointer to contained rng
102  */
103  void Terminate();
104 
105  /**
106  call Terminate()
107  */
108  virtual ~GSLRandomEngine();
109 
110  /**
111  Generate a random number between ]0,1]
112  0 is excluded and 1 is included
113  */
114  double operator() () const;
115 
116  /**
117  Generate a random number between ]0,1]
118  0 is excluded and 1 is included
119  */
120  double Rndm() const { return (*this)(); }
121 
122  /**
123  Generate an integer number between [0,max-1] (including 0 and max-1)
124  if max is larger than available range of algorithm
125  an error message is printed and zero is returned
126  */
127  unsigned long RndmInt(unsigned long max) const;
128  /**
129  Generate an integer number between [0,max_generator-1] (including 0 and max-1)
130  if max is larger than available range of algorithm
131  an error message is printed and zero is returned
132  */
133  unsigned long IntRndm() const {
134  return RndmInt(MaxInt()); // max return the largest value the generator can give +1
135  }
136 
137  /**
138  Generate an array of random numbers.
139  The iterators points to the random numbers
140  */
141  template<class Iterator>
142  void RandomArray(Iterator begin, Iterator end) const {
143  for ( Iterator itr = begin; itr != end; ++itr ) {
144  *itr = this->operator()();
145  }
146  }
147 
148  /**
149  Generate an array of random numbers
150  The iterators points to the random numbers
151  */
152  void RandomArray(double * begin, double * end) const;
153 
154  /**
155  return name of generator
156  */
157  std::string Name() const;
158 
159  /**
160  return the state size of generator
161  */
162  unsigned int Size() const;
163 
164  /**
165  return the minimum integer a generator can handle
166  typically this value is 0
167  */
168  unsigned long MinInt() const;
169 
170  /**
171  return the maximum integer +1 a generator can handle
172 
173  */
174  unsigned long MaxInt() const;
175 
176  /**
177  set the random generator seed
178  */
179  void SetSeed(unsigned int seed) const;
180 
181 
182  /** @name Random Distributions
183  Implemented using the
184  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">
185  GSL Random number Distributions</A>
186  **/
187  //@{
188  /**
189  Gaussian distribution - default method is Box-Muller (polar method)
190  */
191  double Gaussian(double sigma) const;
192 
193  /**
194  Gaussian distribution - Ziggurat method
195  */
196  double GaussianZig(double sigma) const;
197 
198  /**
199  Gaussian distribution - Ratio method
200  */
201  double GaussianRatio(double sigma) const;
202  /**
203  Gaussian Tail distribution
204  */
205  double GaussianTail(double a, double sigma) const;
206 
207  /**
208  Bivariate Gaussian distribution with correlation
209  */
210  void Gaussian2D(double sigmaX, double sigmaY, double rho, double &x, double &y) const;
211 
212  /**
213  Multivariate Gaussian distribution
214  */
215  void GaussianND(const int dim, double *pars, double *covmat, double *genpars) const;
216 
217  /**
218  Exponential distribution
219  */
220  double Exponential(double mu) const;
221 
222  /**
223  Cauchy distribution
224  */
225  double Cauchy(double a) const;
226 
227  /**
228  Landau distribution
229  */
230  double Landau() const;
231 
232  /**
233  Gamma distribution
234  */
235  double Gamma(double a, double b) const;
236 
237  /**
238  Beta distribution
239  */
240  double Beta(double a, double b) const;
241 
242  /**
243  Log Normal distribution
244  */
245  double LogNormal(double zeta, double sigma) const;
246 
247  /**
248  Chi square distribution
249  */
250  double ChiSquare(double nu) const;
251 
252  /**
253  F distrbution
254  */
255  double FDist(double nu1, double nu2) const;
256 
257  /**
258  t student distribution
259  */
260  double tDist(double nu) const;
261 
262  /**
263  Rayleigh distribution
264  */
265  double Rayleigh(double sigma) const;
266 
267  /**
268  Logistic distribution
269  */
270  double Logistic(double a) const;
271 
272  /**
273  Pareto distribution
274  */
275  double Pareto(double a, double b) const;
276 
277  /**
278  generate random numbers in a 2D circle of radious 1
279  */
280  void Dir2D(double &x, double &y) const;
281 
282  /**
283  generate random numbers in a 3D sphere of radious 1
284  */
285  void Dir3D(double &x, double &y, double &z) const;
286 
287  /**
288  Poisson distribution
289  */
290  unsigned int Poisson(double mu) const;
291 
292  /**
293  Binomial distribution
294  */
295  unsigned int Binomial(double p, unsigned int n) const;
296 
297  /**
298  Negative Binomial distribution
299  */
300  unsigned int NegativeBinomial(double p, double n) const;
301 
302  /**
303  Multinomial distribution
304  */
305  std::vector<unsigned int> Multinomial( unsigned int ntot, const std::vector<double> & p ) const;
306 
307  //@}
308 
309 
310 
311  protected:
312 
313  /// internal method used by the derived class to set the type of generators
315  fRng = r;
316  }
317 
318  /// internal method to return the engine
319  /// Used by class like GSLMCIntegrator to set the engine
321  return fRng;
322  }
323 
324  private:
325 
326  GSLRngWrapper * fRng; // pointer to GSL generator wrapper (managed by the class)
327  mutable unsigned int fCurTime; // current time used to seed the generator
328 
329 
330  };
331 
332  //_____________________________________________________________________________________
333  /**
334  Mersenne-Twister generator
335  gsl_rng_mt19937 from
336  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
337 
338 
339  @ingroup Random
340  */
341  class GSLRngMT : public GSLRandomEngine {
342  public:
344  GSLRngMT();
345  };
346 
347  //_____________________________________________________________________________________
348  /**
349  Old Ranlux generator (James, Luscher) (default luxury level, p = 223)
350  (This is eequivalent to TRandom1 with default luxury level)
351  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
352 
353  @ingroup Random
354  */
355  class GSLRngRanLux : public GSLRandomEngine {
356  public:
358  GSLRngRanLux();
359  };
360 
361  //_____________________________________________________________________________________
362  /**
363  Second generation of Ranlux generator for single precision with luxury level of 1
364  (It throws away 202 values for every 12 used)
365  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
366 
367  @ingroup Random
368  */
370  public:
372  GSLRngRanLuxS1();
373  };
374  typedef GSLRngRanLuxS1 GSLRngRanLux1; // for backward compatibility
375 
376  //_____________________________________________________________________________________
377  /**
378  Second generation of Ranlux generator for Single precision with luxury level of 2
379  (It throws away 397 value for every 12 used)
380  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
381 
382  @ingroup Random
383  */
385  public:
387  GSLRngRanLuxS2();
388  };
389  typedef GSLRngRanLuxS2 GSLRngRanLux2; // for backward compatibility
390 
391  //_____________________________________________________________________________________
392  /**
393  Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1
394  (It throws away 202 value for every 12 used)
395  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
396 
397  @ingroup Random
398  */
400  public:
402  GSLRngRanLuxD1();
403  };
404 
405  //_____________________________________________________________________________________
406  /**
407  Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2
408  (It throws away 397 value for every 12 used)
409  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
410 
411  @ingroup Random
412  */
414  public:
416  GSLRngRanLuxD2();
417  };
418  typedef GSLRngRanLuxD2 GSLRngRanLux48; // for backward compatibility
419 
420 
421  //_____________________________________________________________________________________
422  /**
423  Tausworthe generator by L'Ecuyer
424  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
425 
426  @ingroup Random
427  */
428  class GSLRngTaus : public GSLRandomEngine {
429  public:
431  GSLRngTaus();
432  };
433 
434  //_____________________________________________________________________________________
435  /**
436  Lagged Fibonacci generator by Ziff
437  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
438 
439  @ingroup Random
440  */
441  class GSLRngGFSR4 : public GSLRandomEngine {
442  public:
444  GSLRngGFSR4();
445  };
446 
447  //_____________________________________________________________________________________
448  /**
449  Combined multiple recursive generator (L'Ecuyer)
450  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
451 
452  @ingroup Random
453  */
454  class GSLRngCMRG : public GSLRandomEngine {
455  public:
457  GSLRngCMRG();
458  };
459 
460  //_____________________________________________________________________________________
461  /**
462  5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre)
463  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
464 
465  @ingroup Random
466  */
467  class GSLRngMRG : public GSLRandomEngine {
468  public:
470  GSLRngMRG();
471  };
472 
473  //_____________________________________________________________________________________
474  /**
475  BSD rand() generator
476  gsl_rmg_rand from
477  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
478 
479  @ingroup Random
480  */
481  class GSLRngRand : public GSLRandomEngine {
482  public:
484  GSLRngRand();
485  };
486 
487  //_____________________________________________________________________________________
488  /**
489  RANMAR generator
490  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
491 
492  @ingroup Random
493  */
494  class GSLRngRanMar : public GSLRandomEngine {
495  public:
497  GSLRngRanMar();
498  };
499 
500  //_____________________________________________________________________________________
501  /**
502  MINSTD generator (Park and Miller)
503  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
504 
505  @ingroup Random
506  */
507  class GSLRngMinStd : public GSLRandomEngine {
508  public:
510  GSLRngMinStd();
511  };
512 
513  /** MixMax generator based on ROOT::Math::MixMaxEngine of N=240
514 
515  @ingroup Random
516  */
517  class GSLRngMixMax : public GSLRandomEngine {
518  public:
520  GSLRngMixMax();
521  virtual ~GSLRngMixMax(); // we need a dtcor since is not a standard GSL engine
522  };
523 
524 } // namespace Math
525 } // namespace ROOT
526 
527 // random functions specialization for GSL
528 // needs to be defined after defining GSLRandomEngine class
529 
530 #include "Math/GSLRandomFunctions.h"
531 
532 #endif /* ROOT_Math_GSLRndmEngines */
533 
ROOT::Math::GSLRandomEngine::GSLRandomEngine
GSLRandomEngine()
default constructor.
Definition: GSLRndmEngines.cxx:91
ROOT::Math::GSLRandomEngine::fCurTime
unsigned int fCurTime
Definition: GSLRndmEngines.h:327
ROOT::Math::GSLRandomEngine::RndmInt
unsigned long RndmInt(unsigned long max) const
Generate an integer number between [0,max-1] (including 0 and max-1) if max is larger than available ...
Definition: GSLRndmEngines.cxx:150
ROOT::Math::GSLRngRanLuxS1::GSLRngRanLuxS1
GSLRngRanLuxS1()
Definition: GSLRndmEngines.cxx:398
n
const Int_t n
Definition: legend1.C:16
ROOT::Math::GSLRngRanLux::GSLRngRanLux
GSLRngRanLux()
Definition: GSLRndmEngines.cxx:391
ROOT::Math::GSLRngMRG::GSLRngMRG
GSLRngMRG()
Definition: GSLRndmEngines.cxx:451
ROOT::Math::GSLRandomEngine::Name
std::string Name() const
return name of generator
Definition: GSLRndmEngines.cxx:194
ROOT::Math::GSLRngRanLuxS1
Second generation of Ranlux generator for single precision with luxury level of 1 (It throws away 202...
Definition: GSLRndmEngines.h:369
ROOT::Math::GSLRandomEngine::SetSeed
void SetSeed(unsigned int seed) const
set the random generator seed
Definition: GSLRndmEngines.cxx:173
ROOT::Math::GSLRngMinStd::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:509
ROOT::Math::GSLRngGFSR4
Lagged Fibonacci generator by Ziff see here
Definition: GSLRndmEngines.h:441
ROOT::Math::GSLRngMixMax::GSLRngMixMax
GSLRngMixMax()
Definition: GSLRndmEngines.cxx:484
ROOT::Math::GSLRngGFSR4::GSLRngGFSR4
GSLRngGFSR4()
Definition: GSLRndmEngines.cxx:435
ROOT::Math::GSLRandomEngine::Binomial
unsigned int Binomial(double p, unsigned int n) const
Binomial distribution.
Definition: GSLRndmEngines.cxx:354
ROOT::Math::GSLRngRanLuxD2::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:415
ROOT::Math::GSLRngRanLux48
GSLRngRanLuxD2 GSLRngRanLux48
Definition: GSLRndmEngines.h:418
ROOT::Math::GSLRandomEngine::Pareto
double Pareto(double a, double b) const
Pareto distribution.
Definition: GSLRndmEngines.cxx:330
ROOT::Math::GSLRandomEngine::Gamma
double Gamma(double a, double b) const
Gamma distribution.
Definition: GSLRndmEngines.cxx:287
r
ROOT::R::TRInterface & r
Definition: Object.C:4
ROOT::Math::GSLRngWrapper
GSLRngWrapper class to wrap gsl_rng structure.
Definition: GSLRngWrapper.h:25
ROOT::Math::GSLRandomEngine::NegativeBinomial
unsigned int NegativeBinomial(double p, double n) const
Negative Binomial distribution.
Definition: GSLRndmEngines.cxx:360
ROOT::Math::GSLRandomEngine::Multinomial
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p) const
Multinomial distribution.
Definition: GSLRndmEngines.cxx:367
ROOT::Math::GSLRngRand
BSD rand() generator gsl_rmg_rand from here
Definition: GSLRndmEngines.h:481
ROOT::Math::GSLRandomEngine::Poisson
unsigned int Poisson(double mu) const
Poisson distribution.
Definition: GSLRndmEngines.cxx:348
ROOT::Math::GSLRngMinStd::GSLRngMinStd
GSLRngMinStd()
Definition: GSLRndmEngines.cxx:476
x
Double_t x[n]
Definition: legend1.C:17
ROOT::Math::GSLRngRanLuxS2
Second generation of Ranlux generator for Single precision with luxury level of 2 (It throws away 397...
Definition: GSLRndmEngines.h:384
ROOT::Math::GSLRandomEngine::tDist
double tDist(double nu) const
t student distribution
Definition: GSLRndmEngines.cxx:312
ROOT::Math::GSLRngRand::GSLRngRand
GSLRngRand()
Definition: GSLRndmEngines.cxx:460
ROOT::Math::GSLRandomEngine::RandomArray
void RandomArray(Iterator begin, Iterator end) const
Generate an array of random numbers.
Definition: GSLRndmEngines.h:142
ROOT::Math::GSLRandomEngine::Dir2D
void Dir2D(double &x, double &y) const
generate random numbers in a 2D circle of radious 1
Definition: GSLRndmEngines.cxx:336
ROOT::Math::GSLRandomEngine::Logistic
double Logistic(double a) const
Logistic distribution.
Definition: GSLRndmEngines.cxx:324
ROOT::Math::GSLRandomEngine::Gaussian2D
void Gaussian2D(double sigmaX, double sigmaY, double rho, double &x, double &y) const
Bivariate Gaussian distribution with correlation.
Definition: GSLRndmEngines.cxx:238
ROOT::Math::GSLRngRanLux::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:357
ROOT::Math::GSLRngRanMar::GSLRngRanMar
GSLRngRanMar()
Definition: GSLRndmEngines.cxx:468
b
#define b(i)
Definition: RSha256.hxx:100
GSLRandomFunctions.h
ROOT::Math::GSLRandomEngine::Size
unsigned int Size() const
return the state size of generator
Definition: GSLRndmEngines.cxx:202
ROOT::Math::GSLRandomEngine::Beta
double Beta(double a, double b) const
Beta distribution.
Definition: GSLRndmEngines.cxx:281
ROOT::Math::GSLRngMRG
5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre) see here
Definition: GSLRndmEngines.h:467
ROOT::Math::GSLRandomEngine::FDist
double FDist(double nu1, double nu2) const
F distrbution.
Definition: GSLRndmEngines.cxx:306
ROOT::Math::GSLMCIntegrator
Definition: GSLMCIntegrator.h:74
ROOT::Math::GSLRngRanLuxS2::GSLRngRanLuxS2
GSLRngRanLuxS2()
Definition: GSLRndmEngines.cxx:405
ROOT::Math::GSLRngRanMar::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:496
ROOT::Math::GSLRngRanLuxD2::GSLRngRanLuxD2
GSLRngRanLuxD2()
Definition: GSLRndmEngines.cxx:419
ROOT::Math::GSLRandomEngine::SetType
void SetType(GSLRngWrapper *r)
internal method used by the derived class to set the type of generators
Definition: GSLRndmEngines.h:314
ROOT::Math::GSLRngRanLuxS1::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:371
ROOT::Math::GSLRandomEngine::Terminate
void Terminate()
delete pointer to contained rng
Definition: GSLRndmEngines.cxx:134
ROOT::Math::GSLRandomEngine::Dir3D
void Dir3D(double &x, double &y, double &z) const
generate random numbers in a 3D sphere of radious 1
Definition: GSLRndmEngines.cxx:342
ROOT::Math::GSLRngRanLuxD1::GSLRngRanLuxD1
GSLRngRanLuxD1()
Definition: GSLRndmEngines.cxx:412
ROOT::Math::GSLRngGFSR4::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:443
ROOT::Math::GSLRandomEngine::Landau
double Landau() const
Landau distribution.
Definition: GSLRndmEngines.cxx:275
ROOT::Math::GSLRandomEngine::Gaussian
double Gaussian(double sigma) const
Gaussian distribution - default method is Box-Muller (polar method)
Definition: GSLRndmEngines.cxx:218
ROOT::Math::GSLRandomEngine::GaussianND
void GaussianND(const int dim, double *pars, double *covmat, double *genpars) const
Multivariate Gaussian distribution.
Definition: GSLRndmEngines.cxx:244
ROOT::Math::GSLRandomEngine::Cauchy
double Cauchy(double a) const
Cauchy distribution.
Definition: GSLRndmEngines.cxx:269
a
auto * a
Definition: textangle.C:12
ROOT::Math::GSLRandomEngine::Rndm
double Rndm() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
Definition: GSLRndmEngines.h:120
ROOT::Math::GSLRandomEngine::operator()
double operator()() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
Definition: GSLRndmEngines.cxx:143
ROOT::Math::GSLRngRanLux2
GSLRngRanLuxS2 GSLRngRanLux2
Definition: GSLRndmEngines.h:389
ROOT::Math::GSLRngRanLuxD1
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1 (I...
Definition: GSLRndmEngines.h:399
y
Double_t y[n]
Definition: legend1.C:17
ROOT::Math::GSLRngMinStd
MINSTD generator (Park and Miller) see here
Definition: GSLRndmEngines.h:507
ROOT::Math::GSLRandomEngine::ChiSquare
double ChiSquare(double nu) const
Chi square distribution.
Definition: GSLRndmEngines.cxx:299
ROOT::Math::GSLRandomEngine::Exponential
double Exponential(double mu) const
Exponential distribution.
Definition: GSLRndmEngines.cxx:263
ROOT::Math::GSLRngMRG::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:469
sigma
const Double_t sigma
Definition: h1analysisProxy.h:11
ROOT::Math::GSLRandomEngine::operator=
GSLRandomEngine & operator=(const GSLRandomEngine &eng)
Assignment operator : make a deep copy of the contained GSL generator.
Definition: GSLRndmEngines.cxx:116
ROOT::Math::GSLRngTaus::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:430
ROOT::Math::GSLRandomEngine::GaussianZig
double GaussianZig(double sigma) const
Gaussian distribution - Ziggurat method.
Definition: GSLRndmEngines.cxx:212
ROOT::Math::GSLRandomEngine::Engine
GSLRngWrapper * Engine()
internal method to return the engine Used by class like GSLMCIntegrator to set the engine
Definition: GSLRndmEngines.h:320
ROOT::Math::GSLRngCMRG
Combined multiple recursive generator (L'Ecuyer) see here
Definition: GSLRndmEngines.h:454
ROOT::Math::GSLRngRanLuxD1::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:401
ROOT::Math::GSLRandomEngine::Initialize
void Initialize()
initialize the generator If no rng is present the default one based on Mersenne and Twister is create...
Definition: GSLRndmEngines.cxx:127
ROOT::Math::GSLRandomEngine::MaxInt
unsigned long MaxInt() const
return the maximum integer +1 a generator can handle
Definition: GSLRndmEngines.cxx:160
ROOT::Math::GSLRngRanLux1
GSLRngRanLuxS1 GSLRngRanLux1
Definition: GSLRndmEngines.h:374
ROOT::Math::GSLRandomEngine::MinInt
unsigned long MinInt() const
return the minimum integer a generator can handle typically this value is 0
Definition: GSLRndmEngines.cxx:155
ROOT::Math::GSLRandomEngine::GaussianTail
double GaussianTail(double a, double sigma) const
Gaussian Tail distribution.
Definition: GSLRndmEngines.cxx:231
ROOT::Math::GSLRngCMRG::GSLRngCMRG
GSLRngCMRG()
Definition: GSLRndmEngines.cxx:443
ROOT::Math::GSLRngRanLuxD2
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2 (I...
Definition: GSLRndmEngines.h:413
ROOT::Math::GSLRngMixMax::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:519
ROOT::Math::GSLRngRand::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:483
ROOT::Math::GSLRandomEngine::fRng
GSLRngWrapper * fRng
Definition: GSLRndmEngines.h:326
ROOT::Math::GSLRandomEngine::LogNormal
double LogNormal(double zeta, double sigma) const
Log Normal distribution.
Definition: GSLRndmEngines.cxx:293
ROOT::Math::GSLRngTaus
Tausworthe generator by L'Ecuyer see here
Definition: GSLRndmEngines.h:428
ROOT::Math::GSLRandomEngine::Rayleigh
double Rayleigh(double sigma) const
Rayleigh distribution.
Definition: GSLRndmEngines.cxx:318
ROOT::Math::GSLRngMT
Mersenne-Twister generator gsl_rng_mt19937 from here
Definition: GSLRndmEngines.h:341
ROOT::Math::GSLRngMT::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:343
ROOT::Math::GSLRngMixMax
MixMax generator based on ROOT::Math::MixMaxEngine of N=240.
Definition: GSLRndmEngines.h:517
ROOT::Math::GSLRngCMRG::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:456
ROOT::Math::GSLRngMixMax::~GSLRngMixMax
virtual ~GSLRngMixMax()
Definition: GSLRndmEngines.cxx:493
ROOT::Math::GSLRngRanMar
RANMAR generator see here
Definition: GSLRndmEngines.h:494
ROOT::Math::GSLRandomEngine
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
Definition: GSLRndmEngines.h:65
ROOT::Math::GSLRandomEngine::~GSLRandomEngine
virtual ~GSLRandomEngine()
call Terminate()
Definition: GSLRndmEngines.cxx:110
ROOT::Math::GSLRngRanLuxS2::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:386
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Math::GSLRngMT::GSLRngMT
GSLRngMT()
Definition: GSLRndmEngines.cxx:383
Math
Namespace for new Math classes and functions.
ROOT::Math::GSLRngRanLux
Old Ranlux generator (James, Luscher) (default luxury level, p = 223) (This is eequivalent to TRandom...
Definition: GSLRndmEngines.h:355
ROOT::Math::GSLRngTaus::GSLRngTaus
GSLRngTaus()
Definition: GSLRndmEngines.cxx:427
ROOT::Math::GSLRandomEngine::GaussianRatio
double GaussianRatio(double sigma) const
Gaussian distribution - Ratio method.
Definition: GSLRndmEngines.cxx:224
ROOT::Math::GSLRandomEngine::IntRndm
unsigned long IntRndm() const
Generate an integer number between [0,max_generator-1] (including 0 and max-1) if max is larger than ...
Definition: GSLRndmEngines.h:133