gslmm::gaussian Class Reference
[Distributions]

#include <gslmm/random/gaussian.hh>

Inheritance diagram for gslmm::gaussian:

Inheritance graph
[legend]
Collaboration diagram for gslmm::gaussian:

Collaboration graph
[legend]
List of all members.

Detailed Description

gaussian distribution interface class.

The gaussian PDF is

\[ p(x)dx = \frac{1}{\sqrt{2 \pi \sigma^2}} \exp (-x^2/2\sigma^2) dx \]

Examples:

fit/fit-ex.cc, fit/linear-ex.cc, ntuple/ntuple-ex.cc, and random/distribution-test.cc.


Public Member Functions

 gaussian (double sigma, generator &r, bool ratio=false)
virtual ~gaussian ()
virtual return_type sample ()
virtual double pdf (const return_type &x)
virtual double lower_cdf (const return_type &x)
virtual double upper_cdf (const return_type &x)
virtual return_type lower_invcdf (double p)
virtual return_type upper_invcdf (double q)

Protected Types

typedef distribution< double > base_type

Protected Attributes

double _sigma
bool _ratio


Member Typedef Documentation

typedef distribution<double> gslmm::gaussian::base_type [protected]
 

The base type.


Constructor & Destructor Documentation

gslmm::gaussian::gaussian double  sigma,
generator r,
bool  ratio = false
[inline]
 

Constructor.

Parameters:
sigma The $ \sigma$ of the PDF.
ratio if true use the Kinderman-Monahan ratio method.
r The random number generator

virtual gslmm::gaussian::~gaussian  )  [inline, virtual]
 

Destructor.


Member Function Documentation

virtual double gslmm::gaussian::lower_cdf const return_type x  )  [inline, virtual]
 

See also:
gslmm::distribution<Return,Arg>::lower_cdf

virtual return_type gslmm::gaussian::lower_invcdf double  p  )  [inline, virtual]
 

See also:
gslmm::distribution<Return,Arg>::lower_invcdf

Reimplemented from gslmm::distribution< double >.

virtual double gslmm::gaussian::pdf const return_type x  )  [inline, virtual]
 

See also:
gslmm::distribution<Return,Arg>::pdf

virtual return_type gslmm::gaussian::sample  )  [inline, virtual]
 

Sample the distribution.

Returns:
The sample.

Implements gslmm::distribution< double >.

Examples:
fit/linear-ex.cc.

virtual double gslmm::gaussian::upper_cdf const return_type x  )  [inline, virtual]
 

See also:
gslmm::distribution<Return,Arg>::upper_cdf

virtual return_type gslmm::gaussian::upper_invcdf double  q  )  [inline, virtual]
 

See also:
gslmm::distribution<Return,Arg>::upper_invcdf

Reimplemented from gslmm::distribution< double >.


Member Data Documentation

bool gslmm::gaussian::_ratio [protected]
 

Parameter ratio of the distribution.

double gslmm::gaussian::_sigma [protected]
 

Width ($\sigma$) of the distribution.


The documentation for this class was generated from the following file:
Top of page Last update Tue May 9 10:11:33 2006
Christian Holm
Created by DoxyGen 1.4.6