GClasses
|
This is the Normal (a.k.a. Gaussian) distribution. More...
#include <GDistribution.h>
Public Member Functions | |
GNormalDistribution () | |
virtual | ~GNormalDistribution () |
virtual Type | type () const |
Returns the type of distribution. | |
virtual bool | isDiscrete () const |
Returns false. | |
virtual bool | isSupported (double x) const |
Returns true for all values. | |
virtual double | mode () const |
Returns the mode (which is also the mean) | |
virtual double | logLikelihood (double x) |
See the comment for GUnivariateDistribution::logLikelihood. | |
virtual double | likelihood (double x) |
See the comment for GUnivariateDistribution::likelihood. | |
void | setMeanAndVariance (double mean, double variance) |
Sets the mean and variance of this distribution. | |
double | modeLikelihood () |
Returns the probability density (height) of the mode (mode=mean for a normal distribution) | |
double | mean () const |
Returns the mean. | |
double | variance () const |
Returns the variance. | |
void | multiply (GNormalDistribution *pOther) |
Multiplies this by another Normal distribution. | |
Protected Member Functions | |
void | precompute () |
Protected Attributes | |
double | m_mean |
double | m_variance |
double | m_height |
This is the Normal (a.k.a. Gaussian) distribution.
GClasses::GNormalDistribution::GNormalDistribution | ( | ) | [inline] |
virtual GClasses::GNormalDistribution::~GNormalDistribution | ( | ) | [inline, virtual] |
virtual bool GClasses::GNormalDistribution::isDiscrete | ( | ) | const [inline, virtual] |
Returns false.
Implements GClasses::GUnivariateDistribution.
virtual bool GClasses::GNormalDistribution::isSupported | ( | double | x | ) | const [inline, virtual] |
Returns true for all values.
Implements GClasses::GUnivariateDistribution.
virtual double GClasses::GNormalDistribution::likelihood | ( | double | x | ) | [inline, virtual] |
See the comment for GUnivariateDistribution::likelihood.
Implements GClasses::GUnivariateDistribution.
virtual double GClasses::GNormalDistribution::logLikelihood | ( | double | x | ) | [inline, virtual] |
See the comment for GUnivariateDistribution::logLikelihood.
Implements GClasses::GUnivariateDistribution.
double GClasses::GNormalDistribution::mean | ( | ) | const [inline] |
Returns the mean.
virtual double GClasses::GNormalDistribution::mode | ( | ) | const [inline, virtual] |
Returns the mode (which is also the mean)
Implements GClasses::GUnivariateDistribution.
double GClasses::GNormalDistribution::modeLikelihood | ( | ) | [inline] |
Returns the probability density (height) of the mode (mode=mean for a normal distribution)
void GClasses::GNormalDistribution::multiply | ( | GNormalDistribution * | pOther | ) | [inline] |
Multiplies this by another Normal distribution.
void GClasses::GNormalDistribution::precompute | ( | ) | [protected] |
void GClasses::GNormalDistribution::setMeanAndVariance | ( | double | mean, |
double | variance | ||
) | [inline] |
Sets the mean and variance of this distribution.
virtual Type GClasses::GNormalDistribution::type | ( | ) | const [inline, virtual] |
Returns the type of distribution.
Implements GClasses::GUnivariateDistribution.
double GClasses::GNormalDistribution::variance | ( | ) | const [inline] |
Returns the variance.
double GClasses::GNormalDistribution::m_height [protected] |
double GClasses::GNormalDistribution::m_mean [protected] |
double GClasses::GNormalDistribution::m_variance [protected] |