casacore::LogNormal Class Reference

Logarithmic normal distribution. More...

#include <Random.h>

Inheritance diagram for casacore::LogNormal:
casacore::Normal casacore::Random

List of all members.

Public Member Functions

 LogNormal (RNG *gen, Double mean=1.0, Double variance=1.0)
 Construct a random number generator for a log-normal distribution.
virtual ~LogNormal ()
 The destructor is trivial.
virtual Double operator() ()
 Returns a value from the log-normal distribution.
virtual Double mean () const
 Functions that allow you to query and change the parameters of the log-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 Member Functions

void setState ()

Private Attributes

Double itsLogMean
Double itsLogVar

Detailed Description

Logarithmic normal distribution.

Synopsis

The LogNormal class implements the logaraithmic normal 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.

Example

Thrown Exceptions

To Do

Definition at line 1071 of file Random.h.


Constructor & Destructor Documentation

casacore::LogNormal::LogNormal ( RNG gen,
Double  mean = 1.0,
Double  variance = 1.0 
)

Construct a random number generator for a log-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 casacore::LogNormal::~LogNormal (  )  [virtual]

The destructor is trivial.


Member Function Documentation

virtual Bool casacore::LogNormal::checkParameters ( const Vector< Double > &  parms  )  const [virtual]

Reimplemented from casacore::Normal.

virtual void casacore::LogNormal::mean ( Double  x  )  [virtual]

Reimplemented from casacore::Normal.

Double casacore::LogNormal::mean (  )  const [inline, virtual]

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

Reimplemented from casacore::Normal.

Definition at line 1110 of file Random.h.

References itsLogMean.

virtual Double casacore::LogNormal::operator() (  )  [virtual]

Returns a value from the log-normal distribution.

Reimplemented from casacore::Normal.

virtual Vector<Double> casacore::LogNormal::parameters (  )  const [virtual]

Reimplemented from casacore::Normal.

virtual void casacore::LogNormal::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.

Reimplemented from casacore::Normal.

void casacore::LogNormal::setState (  )  [private]
virtual void casacore::LogNormal::variance ( Double  x  )  [virtual]

Reimplemented from casacore::Normal.

Double casacore::LogNormal::variance (  )  const [inline, virtual]

Reimplemented from casacore::Normal.

Definition at line 1114 of file Random.h.

References itsLogVar.


Member Data Documentation

Definition at line 1106 of file Random.h.

Referenced by mean().

Definition at line 1107 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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1