17#ifndef ROOT_Math_GSLRandomFunctions
18#define ROOT_Math_GSLRandomFunctions
42 template <
class EngineType >
58 return Engine().GaussianZig(
sigma) + mean;
69 return mean + Engine().GaussianZig(
sigma);
76 return mean + Engine().Gaussian(
sigma);
83 return mean + Engine().GaussianRatio(
sigma);
90 return Engine().GaussianTail(
a,
sigma);
96 void Gaussian2D(
double sigmaX,
double sigmaY,
double rho,
double &
x,
double &
y) {
97 Engine().Gaussian2D(sigmaX, sigmaY, rho,
x,
y);
104 return Engine().Exponential(tau);
110 return mean + Engine().Cauchy( gamma/2.0 );
117 return mean +
sigma*Engine().Landau();
124 return Engine().Gamma(
a,
b);
131 return Engine().Beta(
a,
b);
138 return Engine().LogNormal(zeta,
sigma);
145 return Engine().ChiSquare(nu);
151 double FDist(
double nu1,
double nu2) {
152 return Engine().FDist(nu1,nu2);
159 return Engine().tDist(nu);
165 return Engine().Rayleigh(
sigma);
172 return Engine().Logistic(
a);
179 return Engine().Pareto(
a,
b);
194 void Sphere(
double &
x,
double &
y,
double &z,
double r = 1) {
195 Engine().Dir3D(
x,
y,z);
205 return Engine().Poisson(mu);
211 unsigned int Binomial(
unsigned int ntot,
double prob) {
212 return Engine().Binomial(prob,ntot);
221 return Engine().NegativeBinomial(prob,
n);
227 std::vector<unsigned int>
Multinomial(
unsigned int ntot,
const std::vector<double> &
p ) {
228 return Engine().Multinomial(ntot,
p);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
double Landau(double mean=0, double sigma=1)
Landau distribution.
double Gamma(double a, double b)
Gamma distribution.
RandomFunctions(EngineType &rng)
double Exp(double tau)
Exponential distribution.
void Sphere(double &x, double &y, double &z, double r=1)
generate random numbers in a 3D sphere of radious 1
double Pareto(double a, double b)
Pareto distribution.
double Logistic(double a)
Logistic distribution.
void Gaussian2D(double sigmaX, double sigmaY, double rho, double &x, double &y)
Bivariate Gaussian distribution with correlation.
unsigned int NegativeBinomial(double n, double prob)
Negative Binomial distribution First parameter is n, second is probability To be consistent with Rand...
double BreitWigner(double mean=0., double gamma=1)
Breit Wigner distribution.
double GausZig(double mean, double sigma)
unsigned int Binomial(unsigned int ntot, double prob)
Binomial distribution.
double LogNormal(double zeta, double sigma)
Log Normal distribution.
double tDist(double nu)
t student distribution
double GaussianTail(double a, double sigma=1)
Gaussian Tail distribution.
double Beta(double a, double b)
Beta distribution.
void Circle(double &x, double &y, double r=1)
generate random numbers in a 2D circle of radious 1
double GausBM(double mean=0, double sigma=1)
Gaussian distribution (Box-Muller method)
double Gaus(double mean=0, double sigma=1)
Gaussian distribution.
double Rayleigh(double sigma)
Rayleigh distribution.
double FDist(double nu1, double nu2)
F distrbution.
double GausR(double mean=0, double sigma=1)
Gaussian distribution (Ratio Method)
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p)
Multinomial distribution.
unsigned int Poisson(double mu)
Poisson distribution.
double ChiSquare(double nu)
Chi square distribution.
Namespace for new Math classes and functions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.