Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

RazorBack::Gaussian_ Class Reference

Gaussian_: implements the Normal distribution. More...

#include <Distrfunc.hh>

Inheritance diagram for RazorBack::Gaussian_:

Inheritance graph
[legend]
Collaboration diagram for RazorBack::Gaussian_:

Collaboration graph
[legend]
List of all members.

Public Methods

 Gaussian_ (double M=0.0, double S=1.0)
 default ctor: init to mean M, standard deviation S. More...

double mu () const
double mu (double M)
double sigma () const
double sigma (double S)
 Sets the spread of the Gaussian, returns old value. More...

virtual double pdf (double X) const
 Returns the PDF at X.

virtual double cdf (double X) const
 Returns the CDF at X.

virtual double inv_cdf (double Y) const
 Returns the inverse CDF, the value of X for which CDF(X)=Y.

virtual double mean () const
 Returns the mean (this is the mu parameter).

virtual double var () const
 Returns the variance (this is the squared sigma parameter).

virtual double skew () const
 Returns the skewness of the distribution.

virtual double kurt () const
 Returns the kurtosis of the distribution.

virtual double entropy () const
 Returns the entropy.

virtual double random () const
 Returns a random number from this normal distribution.


Static Protected Methods

double cdf_std (double Z)
double invcdf_ratio (double P)

Private Attributes

Randomnorm_ Rand
 Gaussian random number generator.


Static Private Attributes

const double SQRT_2PI
const double SQRT2

Detailed Description

Gaussian_: implements the Normal distribution.

Definition at line 150 of file Distrfunc.hh.


Constructor & Destructor Documentation

RazorBack::Gaussian_::Gaussian_ ( double M = 0.0,
double S = 1.0 ) [inline]
 

default ctor: init to mean M, standard deviation S.

Default values are for the standard normal distribution. Throws Badvalexc_ if S==0. If S<0.0 then the absolute value will be used.

Definition at line 165 of file Distrfunc.hh.


Member Function Documentation

double RazorBack::Gaussian_::mu ( ) const [inline]
 

Definition at line 175 of file Distrfunc.hh.

Referenced by mean(), and random().

double RazorBack::Gaussian_::mu ( double M ) [inline]
 

Definition at line 178 of file Distrfunc.hh.

double RazorBack::Gaussian_::sigma ( ) const [inline]
 

Definition at line 181 of file Distrfunc.hh.

Referenced by random(), and var().

double RazorBack::Gaussian_::sigma ( double S ) [inline]
 

Sets the spread of the Gaussian, returns old value.

Throws Badvalexc_ if S==0. If S<0.0 then the absolute value will be used.

Definition at line 188 of file Distrfunc.hh.

double RazorBack::Gaussian_::pdf ( double X ) const [virtual]
 

Returns the PDF at X.

Reimplemented from RazorBack::Distrbase_.

double RazorBack::Gaussian_::cdf ( double X ) const [virtual]
 

Returns the CDF at X.

Reimplemented from RazorBack::Distrbase_.

double RazorBack::Gaussian_::inv_cdf ( double Y ) const [virtual]
 

Returns the inverse CDF, the value of X for which CDF(X)=Y.

Reimplemented from RazorBack::Distrbase_.

double RazorBack::Gaussian_::mean ( ) const [inline, virtual]
 

Returns the mean (this is the mu parameter).

Reimplemented from RazorBack::Distrbase_.

Definition at line 206 of file Distrfunc.hh.

double RazorBack::Gaussian_::var ( ) const [inline, virtual]
 

Returns the variance (this is the squared sigma parameter).

Reimplemented from RazorBack::Distrbase_.

Definition at line 209 of file Distrfunc.hh.

Referenced by entropy().

double RazorBack::Gaussian_::skew ( ) const [inline, virtual]
 

Returns the skewness of the distribution.

Reimplemented from RazorBack::Distrbase_.

Definition at line 212 of file Distrfunc.hh.

double RazorBack::Gaussian_::kurt ( ) const [inline, virtual]
 

Returns the kurtosis of the distribution.

Reimplemented from RazorBack::Distrbase_.

Definition at line 215 of file Distrfunc.hh.

double RazorBack::Gaussian_::entropy ( ) const [inline, virtual]
 

Returns the entropy.

Reimplemented from RazorBack::Distrbase_.

Definition at line 218 of file Distrfunc.hh.

double RazorBack::Gaussian_::random ( void ) const [inline, virtual]
 

Returns a random number from this normal distribution.

Reimplemented from RazorBack::Distrbase_.

Definition at line 224 of file Distrfunc.hh.

double RazorBack::Gaussian_::cdf_std ( double Z ) [static, protected]
 

double RazorBack::Gaussian_::invcdf_ratio ( double P ) [static, protected]
 


Member Data Documentation

const double RazorBack::Gaussian_::SQRT_2PI [static, private]
 

Definition at line 153 of file Distrfunc.hh.

const double RazorBack::Gaussian_::SQRT2 [static, private]
 

Definition at line 153 of file Distrfunc.hh.

Randomnorm_ RazorBack::Gaussian_::Rand [private]
 

Gaussian random number generator.

Definition at line 154 of file Distrfunc.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:16 2002 for The Razorback C++ Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001