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.
Definition at line 1071 of file Random.h.
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.
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.
Reimplemented from casacore::Normal.
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.
Double casacore::LogNormal::itsLogMean [private] |
Double casacore::LogNormal::itsLogVar [private] |
Definition at line 1107 of file Random.h.
Referenced by variance().