Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members

# prapi::Gaussian Class Reference

`#include <Gaussian.h>`

## Detailed Description

A class that contains methods for calculating values from Gaussian distributions and for creating various forms of a Gaussian function.

## Static Public Methods

util::Matrix< double > create2DGaussian (double radius, int size, double width=1)
Create a simple, center-symmetric 2D Gaussian function.

util::Matrix< double > create2DNormal (double radius, int size, double deviation)
Create a 2D normal distribution.

util::List< double > create1DGaussian (double range, int size, double width=1)
Create a list of values containing a sampled 1-D representation of a Gaussian function.

double gaussian (double x, double mean=0, double deviation=1)
Get the value of the normal distribution N(mean,deviation) at x.

double erf (double x)
The "error function" (erf).

## Member Function Documentation

 List< double > prapi::Gaussian::create1DGaussian ( double range, int size, double width = 1 ) ` [static]`
 Create a list of values containing a sampled 1-D representation of a Gaussian function. The first item of the returned list equals to G(-range), and the last to G(range). The size parameter specified the number of sample taken between (and including) these extrema. See also: create2DGaussian(double,int,double)

 Matrix< double > prapi::Gaussian::create2DGaussian ( double radius, int size, double width = 1 ) ` [static]`

Create a simple, center-symmetric 2D Gaussian function.

The center of the Gaussian "hill" is at the center of the returned matrix. The width of the Gaussian function can be controlled by two parameters: radius and width. Radius specifies the range of values the Gaussian is calculated on, and width specifies the width of the Gaussian itself. The default width is one, which results in a Gaussian function with a variance of 0.5. The size parameter effectively specifies the sampling resolution of the Gaussian function. The maximum value of the returned matrix is 1.

Parameters:
 radius calculate values between [-radius,radius] size the size of the output matrix (specifies sampling frequency) width the width of the gaussian (2*std2)
Returns:
a size x size matrix

 Matrix< double > prapi::Gaussian::create2DNormal ( double radius, int size, double deviation ) ` [static]`

Create a 2D normal distribution.

The larger radius and matrix size you use, the closer the sum of the result will be to unity.

Parameters:
 radius calculate values between [-radius,radius] size of the output matrix deviation the standard deviation of the distribution

 double prapi::Gaussian::erf ( double x ) ` [static]`
 The "error function" (erf). Erf is encountered in integrating the normal distribution (normalized Gaussian). erf(x) = int -Inf->x G(t)dt, where G(t) is a Gaussian distribution with zero mean and unit variance. The value of the error function is calculated as a Maclaurin series, which may take quite a lot of time.

 double prapi::Gaussian::gaussian ( double x, double mean = 0, double deviation = 1 ) ` [inline, static]`
 Get the value of the normal distribution N(mean,deviation) at x. If mean is set to 0 and deviation to 1, the distribution is the "standard" normal distribution N(0,1).

The documentation for this class was generated from the following files:
• Gaussian.h
• Gaussian.cc

Documentation generated on 11.09.2003 with Doxygen.