Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1Normal.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 20:23:22 2011
Кодировка:

Поисковые слова: р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п
casacore: casa::Normal Class Reference
Public Member Functions | Private Attributes

casa::Normal Class Reference
[BasicMath_module]

Normal or Gaussian distribution. More...

#include <Random.h>

Inheritance diagram for casa::Normal:
casa::Random casa::LogNormal

List of all members.

Public Member Functions

 Normal (RNG *gen, Double mean=0.0, Double variance=1.0)
 Construct a random number generator for a normal distribution.
virtual ~Normal ()
 The destructor is trivial.
virtual Double operator() ()
 Returns a value from the normal distribution.
virtual Double mean () const
 Functions that allow you to query and change the parameters of the normal distribution.
virtual void mean (Double x)
virtual Double variance () const
virtual void variance (Double x)
virtual void setParameters (const Vector< Double > &parms)
 These function allow you to manipulate the parameters (mean & variance) described above through the base class.
virtual Vector< Doubleparameters () const
virtual Bool checkParameters (const Vector< Double > &parms) const

Private Attributes

Double itsMean
Double itsVariance
Double itsStdDev
Bool itsCached
Double itsCachedValue

Detailed Description

Normal or Gaussian distribution.

Synopsis

The Normal class implements the normal or Gaussian distribution. The mean and variance are the parameters of the distribution. The operator() functions returns a value from this distribution

It is assumed that the supplied variance is positive and an AipsError exception is thrown if this is not true. The remaining members allow you to read and set the parameters. The LogNormal class is derived from this one.

Example

Thrown Exceptions

To Do

Definition at line 997 of file Random.h.


Constructor & Destructor Documentation

casa::Normal::Normal ( RNG gen,
Double  mean = 0.0,
Double  variance = 1.0 
)

Construct a random number generator for a normal distribution.

The first argument is a class that produces random bits. This pointer is NOT taken over by this class and the user is responsible for deleting it. The second and third arguments define the parameters for this distribution as described in the synopsis.

virtual casa::Normal::~Normal (  )  [virtual]

The destructor is trivial.


Member Function Documentation

virtual Bool casa::Normal::checkParameters ( const Vector< Double > &  parms  )  const [virtual]

Implements casa::Random.

Reimplemented in casa::LogNormal.

Double casa::Normal::mean (  )  const [inline, virtual]

Functions that allow you to query and change the parameters of the normal distribution.

Reimplemented in casa::LogNormal.

Definition at line 1038 of file Random.h.

References itsMean.

virtual void casa::Normal::mean ( Double  x  )  [virtual]

Reimplemented in casa::LogNormal.

virtual Double casa::Normal::operator() (  )  [virtual]

Returns a value from the normal distribution.

Implements casa::Random.

Reimplemented in casa::LogNormal.

virtual Vector<Double> casa::Normal::parameters (  )  const [virtual]

Implements casa::Random.

Reimplemented in casa::LogNormal.

virtual void casa::Normal::setParameters ( const Vector< Double > &  parms  )  [virtual]

These function allow you to manipulate the parameters (mean & variance) described above through the base class.

The Vectors must always be of length two.

Implements casa::Random.

Reimplemented in casa::LogNormal.

virtual void casa::Normal::variance ( Double  x  )  [virtual]

Reimplemented in casa::LogNormal.

Double casa::Normal::variance (  )  const [inline, virtual]

Reimplemented in casa::LogNormal.

Definition at line 1042 of file Random.h.

References itsVariance.


Member Data Documentation

Definition at line 1034 of file Random.h.

Definition at line 1035 of file Random.h.

Definition at line 1031 of file Random.h.

Referenced by mean().

Definition at line 1033 of file Random.h.

Definition at line 1032 of file Random.h.

Referenced by variance().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines