casa
$Rev:20696$
|
Logarithmic normal distribution. More...
#include <Random.h>
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< Double > | parameters () const |
virtual Bool | checkParameters (const Vector< Double > &parms) const |
Private Member Functions | |
void | setState () |
Private Attributes | |
Double | itsLogMean |
Double | itsLogVar |
Logarithmic normal distribution.
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.
casa::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 casa::LogNormal::~LogNormal | ( | ) | [virtual] |
The destructor is trivial.
virtual Bool casa::LogNormal::checkParameters | ( | const Vector< Double > & | parms | ) | const [virtual] |
Reimplemented from casa::Normal.
Double casa::LogNormal::mean | ( | ) | const [inline, virtual] |
Functions that allow you to query and change the parameters of the log-normal distribution.
Reimplemented from casa::Normal.
Definition at line 1110 of file Random.h.
References itsLogMean.
virtual void casa::LogNormal::mean | ( | Double | x | ) | [virtual] |
Reimplemented from casa::Normal.
virtual Double casa::LogNormal::operator() | ( | ) | [virtual] |
Returns a value from the log-normal distribution.
Reimplemented from casa::Normal.
virtual Vector<Double> casa::LogNormal::parameters | ( | ) | const [virtual] |
Reimplemented from casa::Normal.
virtual void casa::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 casa::Normal.
void casa::LogNormal::setState | ( | ) | [private] |
Double casa::LogNormal::variance | ( | ) | const [inline, virtual] |
virtual void casa::LogNormal::variance | ( | Double | x | ) | [virtual] |
Reimplemented from casa::Normal.
Double casa::LogNormal::itsLogMean [private] |
Double casa::LogNormal::itsLogVar [private] |
Definition at line 1107 of file Random.h.
Referenced by variance().