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  */
65  class GSLRandomEngine {
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  */
82  GSLRandomEngine( GSLRngWrapper * rng);
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  Exponential distribution
214  */
215  double Exponential(double mu) const;
216 
217  /**
218  Cauchy distribution
219  */
220  double Cauchy(double a) const;
221 
222  /**
223  Landau distribution
224  */
225  double Landau() const;
226 
227  /**
228  Gamma distribution
229  */
230  double Gamma(double a, double b) const;
231 
232  /**
233  Beta distribution
234  */
235  double Beta(double a, double b) const;
236 
237  /**
238  Log Normal distribution
239  */
240  double LogNormal(double zeta, double sigma) const;
241 
242  /**
243  Chi square distribution
244  */
245  double ChiSquare(double nu) const;
246 
247  /**
248  F distrbution
249  */
250  double FDist(double nu1, double nu2) const;
251 
252  /**
253  t student distribution
254  */
255  double tDist(double nu) const;
256 
257  /**
258  Rayleigh distribution
259  */
260  double Rayleigh(double sigma) const;
261 
262  /**
263  Logistic distribution
264  */
265  double Logistic(double a) const;
266 
267  /**
268  Pareto distribution
269  */
270  double Pareto(double a, double b) const;
271 
272  /**
273  generate random numbers in a 2D circle of radious 1
274  */
275  void Dir2D(double &x, double &y) const;
276 
277  /**
278  generate random numbers in a 3D sphere of radious 1
279  */
280  void Dir3D(double &x, double &y, double &z) const;
281 
282  /**
283  Poisson distribution
284  */
285  unsigned int Poisson(double mu) const;
286 
287  /**
288  Binomial distribution
289  */
290  unsigned int Binomial(double p, unsigned int n) const;
291 
292  /**
293  Negative Binomial distribution
294  */
295  unsigned int NegativeBinomial(double p, double n) const;
296 
297  /**
298  Multinomial distribution
299  */
300  std::vector<unsigned int> Multinomial( unsigned int ntot, const std::vector<double> & p ) const;
301 
302  //@}
303 
304 
305 
306  protected:
307 
308  /// internal method used by the derived class to set the type of generators
309  void SetType(GSLRngWrapper * r) {
310  fRng = r;
311  }
312 
313  /// internal method to return the engine
314  /// Used by class like GSLMCIntegrator to set the engine
315  GSLRngWrapper * Engine() {
316  return fRng;
317  }
318 
319  private:
320 
321  GSLRngWrapper * fRng; // pointer to GSL generator wrapper (managed by the class)
322  mutable unsigned int fCurTime; // current time used to seed the generator
323 
324 
325  };
326 
327  //_____________________________________________________________________________________
328  /**
329  Mersenne-Twister generator
330  gsl_rng_mt19937 from
331  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
332 
333 
334  @ingroup Random
335  */
336  class GSLRngMT : public GSLRandomEngine {
337  public:
338  typedef GSLRandomEngine BaseType;
339  GSLRngMT();
340  };
341 
342  //_____________________________________________________________________________________
343  /**
344  Old Ranlux generator (James, Luscher) (default luxury level, p = 223)
345  (This is eequivalent to TRandom1 with default luxury level)
346  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
347 
348  @ingroup Random
349  */
350  class GSLRngRanLux : public GSLRandomEngine {
351  public:
352  typedef GSLRandomEngine BaseType;
354  };
355 
356  //_____________________________________________________________________________________
357  /**
358  Second generation of Ranlux generator for single precision with luxury level of 1
359  (It throws away 202 values for every 12 used)
360  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
361 
362  @ingroup Random
363  */
364  class GSLRngRanLuxS1 : public GSLRandomEngine {
365  public:
366  typedef GSLRandomEngine BaseType;
367  GSLRngRanLuxS1();
368  };
369  typedef GSLRngRanLuxS1 GSLRngRanLux1; // for backward compatibility
370 
371  //_____________________________________________________________________________________
372  /**
373  Second generation of Ranlux generator for Single precision with luxury level of 2
374  (It throws away 397 value for every 12 used)
375  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
376 
377  @ingroup Random
378  */
379  class GSLRngRanLuxS2 : public GSLRandomEngine {
380  public:
381  typedef GSLRandomEngine BaseType;
382  GSLRngRanLuxS2();
383  };
384  typedef GSLRngRanLuxS2 GSLRngRanLux2; // for backward compatibility
385 
386  //_____________________________________________________________________________________
387  /**
388  Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1
389  (It throws away 202 value for every 12 used)
390  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
391 
392  @ingroup Random
393  */
394  class GSLRngRanLuxD1 : public GSLRandomEngine {
395  public:
396  typedef GSLRandomEngine BaseType;
397  GSLRngRanLuxD1();
398  };
399 
400  //_____________________________________________________________________________________
401  /**
402  Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2
403  (It throws away 397 value for every 12 used)
404  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
405 
406  @ingroup Random
407  */
408  class GSLRngRanLuxD2 : public GSLRandomEngine {
409  public:
410  typedef GSLRandomEngine BaseType;
411  GSLRngRanLuxD2();
412  };
413  typedef GSLRngRanLuxD2 GSLRngRanLux48; // for backward compatibility
414 
415 
416  //_____________________________________________________________________________________
417  /**
418  Tausworthe generator by L'Ecuyer
419  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
420 
421  @ingroup Random
422  */
423  class GSLRngTaus : public GSLRandomEngine {
424  public:
425  typedef GSLRandomEngine BaseType;
426  GSLRngTaus();
427  };
428 
429  //_____________________________________________________________________________________
430  /**
431  Lagged Fibonacci generator by Ziff
432  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
433 
434  @ingroup Random
435  */
436  class GSLRngGFSR4 : public GSLRandomEngine {
437  public:
438  typedef GSLRandomEngine BaseType;
439  GSLRngGFSR4();
440  };
441 
442  //_____________________________________________________________________________________
443  /**
444  Combined multiple recursive generator (L'Ecuyer)
445  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
446 
447  @ingroup Random
448  */
449  class GSLRngCMRG : public GSLRandomEngine {
450  public:
452  GSLRngCMRG();
453  };
454 
455  //_____________________________________________________________________________________
456  /**
457  5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre)
458  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html">here</A>
459 
460  @ingroup Random
461  */
462  class GSLRngMRG : public GSLRandomEngine {
463  public:
464  typedef GSLRandomEngine BaseType;
465  GSLRngMRG();
466  };
467 
468  //_____________________________________________________________________________________
469  /**
470  BSD rand() generator
471  gsl_rmg_rand from
472  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
473 
474  @ingroup Random
475  */
476  class GSLRngRand : public GSLRandomEngine {
477  public:
478  typedef GSLRandomEngine BaseType;
479  GSLRngRand();
480  };
481 
482  //_____________________________________________________________________________________
483  /**
484  RANMAR generator
485  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
486 
487  @ingroup Random
488  */
489  class GSLRngRanMar : public GSLRandomEngine {
490  public:
491  typedef GSLRandomEngine BaseType;
492  GSLRngRanMar();
493  };
494 
495  //_____________________________________________________________________________________
496  /**
497  MINSTD generator (Park and Miller)
498  see <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Unix-random-number-generators.html">here</A>
499 
500  @ingroup Random
501  */
502  class GSLRngMinStd : public GSLRandomEngine {
503  public:
504  typedef GSLRandomEngine BaseType;
505  GSLRngMinStd();
506  };
507 
508  /** MixMax generator based on ROOT::Math::MixMaxEngine of N=240
509 
510  @ingroup Random
511  */
512  class GSLRngMixMax : public GSLRandomEngine {
513  public:
515  GSLRngMixMax();
516  virtual ~GSLRngMixMax(); // we need a dtcor since is not a standard GSL engine
517  };
518 
519 } // namespace Math
520 } // namespace ROOT
521 
522 // random functions specialization for GSL
523 // needs to be defined after defining GSLRandomEngine class
524 
525 #include "Math/GSLRandomFunctions.h"
526 
527 #endif /* ROOT_Math_GSLRndmEngines */
528 
ROOT::Math::GSLRandomEngine::GSLRandomEngine
GSLRandomEngine()
default constructor.
Definition: GSLRndmEngines.cxx:57
ROOT::Math::GSLRandomEngine::fCurTime
unsigned int fCurTime
Definition: GSLRndmEngines.h:360
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:116
ROOT::Math::GSLRngRanLuxS1::GSLRngRanLuxS1
GSLRngRanLuxS1()
Definition: GSLRndmEngines.cxx:345
n
const Int_t n
Definition: legend1.C:16
ROOT::Math::GSLRngRanLux::GSLRngRanLux
GSLRngRanLux()
Definition: GSLRndmEngines.cxx:338
ROOT::Math::GSLRngMRG::GSLRngMRG
GSLRngMRG()
Definition: GSLRndmEngines.cxx:398
ROOT::Math::GSLRandomEngine::Name
std::string Name() const
return name of generator
Definition: GSLRndmEngines.cxx:160
ROOT::Math::GSLRngRanLuxS1
Second generation of Ranlux generator for single precision with luxury level of 1 (It throws away 202...
Definition: GSLRndmEngines.h:402
ROOT::Math::GSLRandomEngine::SetSeed
void SetSeed(unsigned int seed) const
set the random generator seed
Definition: GSLRndmEngines.cxx:139
ROOT::Math::GSLRngMinStd::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:542
ROOT::Math::GSLRngGFSR4
Lagged Fibonacci generator by Ziff see here
Definition: GSLRndmEngines.h:474
ROOT::Math::GSLRngMixMax::GSLRngMixMax
GSLRngMixMax()
Definition: GSLRndmEngines.cxx:431
ROOT::Math::GSLRngGFSR4::GSLRngGFSR4
GSLRngGFSR4()
Definition: GSLRndmEngines.cxx:382
ROOT::Math::GSLRandomEngine::Binomial
unsigned int Binomial(double p, unsigned int n) const
Binomial distribution.
Definition: GSLRndmEngines.cxx:301
ROOT::Math::GSLRngRanLuxD2::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:448
ROOT::Math::GSLRngRanLux48
GSLRngRanLuxD2 GSLRngRanLux48
Definition: GSLRndmEngines.h:451
ROOT::Math::GSLRandomEngine::Pareto
double Pareto(double a, double b) const
Pareto distribution.
Definition: GSLRndmEngines.cxx:277
ROOT::Math::GSLRandomEngine::Gamma
double Gamma(double a, double b) const
Gamma distribution.
Definition: GSLRndmEngines.cxx:234
r
ROOT::R::TRInterface & r
Definition: Object.C:4
ROOT::Math::GSLRandomEngine::GSLMCIntegrator
friend class GSLMCIntegrator
Definition: GSLRndmEngines.h:105
ROOT::Math::GSLRngWrapper
GSLRngWrapper class to wrap gsl_rng structure.
Definition: GSLRngWrapper.h:35
ROOT::Math::GSLRandomEngine::NegativeBinomial
unsigned int NegativeBinomial(double p, double n) const
Negative Binomial distribution.
Definition: GSLRndmEngines.cxx:307
ROOT::Math::GSLRandomEngine::Multinomial
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p) const
Multinomial distribution.
Definition: GSLRndmEngines.cxx:314
ROOT::Math::GSLRngRand
BSD rand() generator gsl_rmg_rand from here
Definition: GSLRndmEngines.h:514
ROOT::Math::GSLRandomEngine::Poisson
unsigned int Poisson(double mu) const
Poisson distribution.
Definition: GSLRndmEngines.cxx:295
ROOT::Math::GSLRngMinStd::GSLRngMinStd
GSLRngMinStd()
Definition: GSLRndmEngines.cxx:423
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:417
ROOT::Math::GSLRandomEngine::tDist
double tDist(double nu) const
t student distribution
Definition: GSLRndmEngines.cxx:259
ROOT::Math::GSLRngRand::GSLRngRand
GSLRngRand()
Definition: GSLRndmEngines.cxx:407
ROOT::Math::GSLRandomEngine::RandomArray
void RandomArray(Iterator begin, Iterator end) const
Generate an array of random numbers.
Definition: GSLRndmEngines.h:180
ROOT::Math::GSLRandomEngine::Dir2D
void Dir2D(double &x, double &y) const
generate random numbers in a 2D circle of radious 1
Definition: GSLRndmEngines.cxx:283
ROOT::Math::GSLRandomEngine::Logistic
double Logistic(double a) const
Logistic distribution.
Definition: GSLRndmEngines.cxx:271
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:204
ROOT::Math::GSLRngRanLux::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:390
ROOT::Math::GSLRngRanMar::GSLRngRanMar
GSLRngRanMar()
Definition: GSLRndmEngines.cxx:415
b
#define b(i)
Definition: RSha256.hxx:118
GSLRandomFunctions.h
ROOT::Math::GSLRandomEngine::Size
unsigned int Size() const
return the state size of generator
Definition: GSLRndmEngines.cxx:168
ROOT::Math::GSLRandomEngine::Beta
double Beta(double a, double b) const
Beta distribution.
Definition: GSLRndmEngines.cxx:228
ROOT::Math::GSLRngMRG
5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre) see here
Definition: GSLRndmEngines.h:500
ROOT::Math::GSLRandomEngine::FDist
double FDist(double nu1, double nu2) const
F distrbution.
Definition: GSLRndmEngines.cxx:253
ROOT::Math::GSLRngRanLuxS2::GSLRngRanLuxS2
GSLRngRanLuxS2()
Definition: GSLRndmEngines.cxx:352
ROOT::Math::GSLRngRanMar::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:529
ROOT::Math::GSLRngRanLuxD2::GSLRngRanLuxD2
GSLRngRanLuxD2()
Definition: GSLRndmEngines.cxx:366
ROOT::Math::GSLRandomEngine::SetType
void SetType(GSLRngWrapper *r)
internal method used by the derived class to set the type of generators
Definition: GSLRndmEngines.h:347
ROOT::Math::GSLRngRanLuxS1::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:404
ROOT::Math::GSLRandomEngine::Terminate
void Terminate()
delete pointer to contained rng
Definition: GSLRndmEngines.cxx:100
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:289
ROOT::Math::GSLRngRanLuxD1::GSLRngRanLuxD1
GSLRngRanLuxD1()
Definition: GSLRndmEngines.cxx:359
ROOT::Math::GSLRngGFSR4::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:476
ROOT::Math::GSLRandomEngine::Landau
double Landau() const
Landau distribution.
Definition: GSLRndmEngines.cxx:222
ROOT::Math::GSLRandomEngine::Gaussian
double Gaussian(double sigma) const
Gaussian distribution - default method is Box-Muller (polar method)
Definition: GSLRndmEngines.cxx:184
ROOT::Math::GSLRandomEngine::Cauchy
double Cauchy(double a) const
Cauchy distribution.
Definition: GSLRndmEngines.cxx:216
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:158
ROOT::Math::GSLRandomEngine::operator()
double operator()() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
Definition: GSLRndmEngines.cxx:109
ROOT::Math::GSLRngRanLux2
GSLRngRanLuxS2 GSLRngRanLux2
Definition: GSLRndmEngines.h:422
ROOT::Math::GSLRngRanLuxD1
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1 (I...
Definition: GSLRndmEngines.h:432
y
Double_t y[n]
Definition: legend1.C:17
ROOT::Math::GSLRngMinStd
MINSTD generator (Park and Miller) see here
Definition: GSLRndmEngines.h:540
ROOT::Math::GSLRandomEngine::ChiSquare
double ChiSquare(double nu) const
Chi square distribution.
Definition: GSLRndmEngines.cxx:246
ROOT::Math::GSLRandomEngine::Exponential
double Exponential(double mu) const
Exponential distribution.
Definition: GSLRndmEngines.cxx:210
ROOT::Math::GSLRngMRG::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:502
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:82
ROOT::Math::GSLRngTaus::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:463
ROOT::Math::GSLRandomEngine::GaussianZig
double GaussianZig(double sigma) const
Gaussian distribution - Ziggurat method.
Definition: GSLRndmEngines.cxx:178
ROOT::Math::GSLRandomEngine::Engine
GSLRngWrapper * Engine()
internal method to return the engine Used by class like GSLMCIntegrator to set the engine
Definition: GSLRndmEngines.h:353
ROOT::Math::GSLRngCMRG
Combined multiple recursive generator (L'Ecuyer) see here
Definition: GSLRndmEngines.h:487
ROOT::Math::GSLRngRanLuxD1::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:434
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:93
ROOT::Math::GSLRandomEngine::MaxInt
unsigned long MaxInt() const
return the maximum integer +1 a generator can handle
Definition: GSLRndmEngines.cxx:126
ROOT::Math::GSLRngRanLux1
GSLRngRanLuxS1 GSLRngRanLux1
Definition: GSLRndmEngines.h:407
ROOT::Math::GSLRandomEngine::MinInt
unsigned long MinInt() const
return the minimum integer a generator can handle typically this value is 0
Definition: GSLRndmEngines.cxx:121
ROOT::Math::GSLRandomEngine::GaussianTail
double GaussianTail(double a, double sigma) const
Gaussian Tail distribution.
Definition: GSLRndmEngines.cxx:197
ROOT::Math::GSLRngCMRG::GSLRngCMRG
GSLRngCMRG()
Definition: GSLRndmEngines.cxx:390
ROOT::Math::GSLRngRanLuxD2
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2 (I...
Definition: GSLRndmEngines.h:446
ROOT::Math::GSLRngMixMax::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:552
ROOT::Math::GSLRngRand::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:516
ROOT::Math::GSLRandomEngine::fRng
GSLRngWrapper * fRng
Definition: GSLRndmEngines.h:359
ROOT::Math::GSLRandomEngine::LogNormal
double LogNormal(double zeta, double sigma) const
Log Normal distribution.
Definition: GSLRndmEngines.cxx:240
ROOT::Math::GSLRngTaus
Tausworthe generator by L'Ecuyer see here
Definition: GSLRndmEngines.h:461
ROOT::Math::GSLRandomEngine::Rayleigh
double Rayleigh(double sigma) const
Rayleigh distribution.
Definition: GSLRndmEngines.cxx:265
ROOT::Math::GSLRngMT::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:376
ROOT::Math::GSLRngMixMax
MixMax generator based on ROOT::Math::MixMaxEngine of N=240.
Definition: GSLRndmEngines.h:550
ROOT::Math::GSLRngCMRG::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:489
ROOT::Math::GSLRngMixMax::~GSLRngMixMax
virtual ~GSLRngMixMax()
Definition: GSLRndmEngines.cxx:440
ROOT::Math::GSLRngRanMar
RANMAR generator see here
Definition: GSLRndmEngines.h:527
ROOT::Math::GSLRandomEngine
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
Definition: GSLRndmEngines.h:103
ROOT::Math::GSLRandomEngine::~GSLRandomEngine
virtual ~GSLRandomEngine()
call Terminate()
Definition: GSLRndmEngines.cxx:76
ROOT::Math::GSLRngRanLuxS2::BaseType
GSLRandomEngine BaseType
Definition: GSLRndmEngines.h:419
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Math::GSLRngMT::GSLRngMT
GSLRngMT()
Definition: GSLRndmEngines.cxx:330
Math
ROOT::Math::GSLRngRanLux
Old Ranlux generator (James, Luscher) (default luxury level, p = 223) (This is eequivalent to TRandom...
Definition: GSLRndmEngines.h:388
ROOT::Math::GSLRngTaus::GSLRngTaus
GSLRngTaus()
Definition: GSLRndmEngines.cxx:374
ROOT::Math::GSLRandomEngine::GaussianRatio
double GaussianRatio(double sigma) const
Gaussian distribution - Ratio method.
Definition: GSLRndmEngines.cxx:190
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:171