BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Math::GSLRngGFSR4 Class Reference

Description

Lagged Fibonacci generator by Ziff see here

Definition at line 436 of file GSLRndmEngines.h.

Inheritance diagram for ROOT::Math::GSLRngGFSR4:
[legend]
Collaboration diagram for ROOT::Math::GSLRngGFSR4:
[legend]

Public Types

typedef GSLRandomEngine BaseType
 

Public Member Functions

 GSLRngGFSR4 ()
 
void Initialize ()
 
unsigned long IntRndm () const
 
unsigned long MaxInt () const
 
unsigned long MinInt () const
 
std::string Name () const
 
double operator() () const
 
void RandomArray (double *begin, double *end) const
 
template<class Iterator >
void RandomArray (Iterator begin, Iterator end) const
 
double Rndm () const
 
unsigned long RndmInt (unsigned long max) const
 
void SetSeed (unsigned int seed) const
 
unsigned int Size () const
 
void Terminate ()
 

Random Distributions

Implemented using the GSL Random number Distributions

double Gaussian (double sigma) const
 
double GaussianZig (double sigma) const
 
double GaussianRatio (double sigma) const
 
double GaussianTail (double a, double sigma) const
 
void Gaussian2D (double sigmaX, double sigmaY, double rho, double &x, double &y) const
 
double Exponential (double mu) const
 
double Cauchy (double a) const
 
double Landau () const
 
double Gamma (double a, double b) const
 
double Beta (double a, double b) const
 
double LogNormal (double zeta, double sigma) const
 
double ChiSquare (double nu) const
 
double FDist (double nu1, double nu2) const
 
double tDist (double nu) const
 
double Rayleigh (double sigma) const
 
double Logistic (double a) const
 
double Pareto (double a, double b) const
 
void Dir2D (double &x, double &y) const
 
void Dir3D (double &x, double &y, double &z) const
 
unsigned int Poisson (double mu) const
 
unsigned int Binomial (double p, unsigned int n) const
 
unsigned int NegativeBinomial (double p, double n) const
 
std::vector< unsigned int > Multinomial (unsigned int ntot, const std::vector< double > &p) const
 
GSLRngWrapperfRng
 
unsigned int fCurTime
 
void SetType (GSLRngWrapper *r)
 internal method used by the derived class to set the type of generators More...
 
GSLRngWrapperEngine ()
 internal method to return the engine Used by class like GSLMCIntegrator to set the engine More...
 

Member Typedef Documentation

◆ BaseType

Constructor & Destructor Documentation

◆ GSLRngGFSR4()

ROOT::Math::GSLRngGFSR4::GSLRngGFSR4 ( )

Member Function Documentation

◆ Beta()

double ROOT::Math::GSLRandomEngine::Beta ( double  a,
double  b 
) const
inherited

Beta distribution

◆ Binomial()

unsigned int ROOT::Math::GSLRandomEngine::Binomial ( double  p,
unsigned int  n 
) const
inherited

Binomial distribution

◆ Cauchy()

double ROOT::Math::GSLRandomEngine::Cauchy ( double  a) const
inherited

Cauchy distribution

◆ ChiSquare()

double ROOT::Math::GSLRandomEngine::ChiSquare ( double  nu) const
inherited

Chi square distribution

◆ Dir2D()

void ROOT::Math::GSLRandomEngine::Dir2D ( double &  x,
double &  y 
) const
inherited

generate random numbers in a 2D circle of radious 1

◆ Dir3D()

void ROOT::Math::GSLRandomEngine::Dir3D ( double &  x,
double &  y,
double &  z 
) const
inherited

generate random numbers in a 3D sphere of radious 1

◆ Engine()

GSLRngWrapper* ROOT::Math::GSLRandomEngine::Engine ( )
inlineprotectedinherited

internal method to return the engine Used by class like GSLMCIntegrator to set the engine

Definition at line 315 of file GSLRndmEngines.h.

315  {
316  return fRng;
317  }

References ROOT::Math::GSLRandomEngine::fRng.

◆ Exponential()

double ROOT::Math::GSLRandomEngine::Exponential ( double  mu) const
inherited

Exponential distribution

◆ FDist()

double ROOT::Math::GSLRandomEngine::FDist ( double  nu1,
double  nu2 
) const
inherited

F distrbution

◆ Gamma()

double ROOT::Math::GSLRandomEngine::Gamma ( double  a,
double  b 
) const
inherited

Gamma distribution

◆ Gaussian()

double ROOT::Math::GSLRandomEngine::Gaussian ( double  sigma) const
inherited

Gaussian distribution - default method is Box-Muller (polar method)

◆ Gaussian2D()

void ROOT::Math::GSLRandomEngine::Gaussian2D ( double  sigmaX,
double  sigmaY,
double  rho,
double &  x,
double &  y 
) const
inherited

Bivariate Gaussian distribution with correlation

◆ GaussianRatio()

double ROOT::Math::GSLRandomEngine::GaussianRatio ( double  sigma) const
inherited

Gaussian distribution - Ratio method

◆ GaussianTail()

double ROOT::Math::GSLRandomEngine::GaussianTail ( double  a,
double  sigma 
) const
inherited

Gaussian Tail distribution

◆ GaussianZig()

double ROOT::Math::GSLRandomEngine::GaussianZig ( double  sigma) const
inherited

Gaussian distribution - Ziggurat method

◆ Initialize()

void ROOT::Math::GSLRandomEngine::Initialize ( )
inherited

initialize the generator If no rng is present the default one based on Mersenne and Twister is created

◆ IntRndm()

unsigned long ROOT::Math::GSLRandomEngine::IntRndm ( ) const
inlineinherited

Generate an integer number between [0,max_generator-1] (including 0 and max-1) if max is larger than available range of algorithm an error message is printed and zero is returned

Definition at line 133 of file GSLRndmEngines.h.

133  {
134  return RndmInt(MaxInt()); // max return the largest value the generator can give +1
135  }
unsigned long MaxInt() const
unsigned long RndmInt(unsigned long max) const

References ROOT::Math::GSLRandomEngine::MaxInt(), and ROOT::Math::GSLRandomEngine::RndmInt().

Here is the call graph for this function:

◆ Landau()

double ROOT::Math::GSLRandomEngine::Landau ( ) const
inherited

Landau distribution

◆ Logistic()

double ROOT::Math::GSLRandomEngine::Logistic ( double  a) const
inherited

Logistic distribution

◆ LogNormal()

double ROOT::Math::GSLRandomEngine::LogNormal ( double  zeta,
double  sigma 
) const
inherited

Log Normal distribution

◆ MaxInt()

unsigned long ROOT::Math::GSLRandomEngine::MaxInt ( ) const
inherited

return the maximum integer +1 a generator can handle

Referenced by ROOT::Math::GSLRandomEngine::IntRndm().

◆ MinInt()

unsigned long ROOT::Math::GSLRandomEngine::MinInt ( ) const
inherited

return the minimum integer a generator can handle typically this value is 0

◆ Multinomial()

std::vector<unsigned int> ROOT::Math::GSLRandomEngine::Multinomial ( unsigned int  ntot,
const std::vector< double > &  p 
) const
inherited

Multinomial distribution

◆ Name()

std::string ROOT::Math::GSLRandomEngine::Name ( ) const
inherited

return name of generator

◆ NegativeBinomial()

unsigned int ROOT::Math::GSLRandomEngine::NegativeBinomial ( double  p,
double  n 
) const
inherited

Negative Binomial distribution

◆ operator()()

double ROOT::Math::GSLRandomEngine::operator() ( ) const
inherited

Generate a random number between ]0,1] 0 is excluded and 1 is included

Referenced by ROOT::Math::GSLRandomEngine::RandomArray().

◆ Pareto()

double ROOT::Math::GSLRandomEngine::Pareto ( double  a,
double  b 
) const
inherited

Pareto distribution

◆ Poisson()

unsigned int ROOT::Math::GSLRandomEngine::Poisson ( double  mu) const
inherited

Poisson distribution

◆ RandomArray() [1/2]

void ROOT::Math::GSLRandomEngine::RandomArray ( double *  begin,
double *  end 
) const
inherited

Generate an array of random numbers The iterators points to the random numbers

◆ RandomArray() [2/2]

template<class Iterator >
void ROOT::Math::GSLRandomEngine::RandomArray ( Iterator  begin,
Iterator  end 
) const
inlineinherited

Generate an array of random numbers. The iterators points to the random numbers

Definition at line 142 of file GSLRndmEngines.h.

142  {
143  for ( Iterator itr = begin; itr != end; ++itr ) {
144  *itr = this->operator()();
145  }
146  }

References ROOT::Math::GSLRandomEngine::operator()().

Here is the call graph for this function:

◆ Rayleigh()

double ROOT::Math::GSLRandomEngine::Rayleigh ( double  sigma) const
inherited

Rayleigh distribution

◆ Rndm()

double ROOT::Math::GSLRandomEngine::Rndm ( ) const
inlineinherited

Generate a random number between ]0,1] 0 is excluded and 1 is included

Definition at line 120 of file GSLRndmEngines.h.

120 { return (*this)(); }

◆ RndmInt()

unsigned long ROOT::Math::GSLRandomEngine::RndmInt ( unsigned long  max) const
inherited

Generate an integer number between [0,max-1] (including 0 and max-1) if max is larger than available range of algorithm an error message is printed and zero is returned

Referenced by ROOT::Math::GSLRandomEngine::IntRndm().

◆ SetSeed()

void ROOT::Math::GSLRandomEngine::SetSeed ( unsigned int  seed) const
inherited

set the random generator seed

◆ SetType()

void ROOT::Math::GSLRandomEngine::SetType ( GSLRngWrapper r)
inlineprotectedinherited

internal method used by the derived class to set the type of generators

Definition at line 309 of file GSLRndmEngines.h.

309  {
310  fRng = r;
311  }

References ROOT::Math::GSLRandomEngine::fRng.

◆ Size()

unsigned int ROOT::Math::GSLRandomEngine::Size ( ) const
inherited

return the state size of generator

◆ tDist()

double ROOT::Math::GSLRandomEngine::tDist ( double  nu) const
inherited

t student distribution

◆ Terminate()

void ROOT::Math::GSLRandomEngine::Terminate ( )
inherited

delete pointer to contained rng

Member Data Documentation

◆ fCurTime

unsigned int ROOT::Math::GSLRandomEngine::fCurTime
mutableprivateinherited

Definition at line 322 of file GSLRndmEngines.h.

◆ fRng

GSLRngWrapper* ROOT::Math::GSLRandomEngine::fRng
privateinherited

The documentation for this class was generated from the following file: