GClasses
|
This is a continuous uniform distribution. More...
#include <GDistribution.h>
Public Member Functions | |
GUniformDistribution () | |
virtual | ~GUniformDistribution () |
virtual Type | type () const |
Returns the type of distribution. | |
virtual bool | isDiscrete () const |
Returns false. | |
virtual bool | isSupported (double x) const |
Returns true iff a <= x < b. | |
virtual double | mode () const |
Returns the middle value (which is also the mean and median) | |
virtual double | logLikelihood (double x) |
See the comment for GUnivariateDistribution::logLikelihood. | |
virtual double | likelihood (double x) |
See the comment for GUnivariateDistribution::likelihood. | |
double | mean () const |
Returns the middle value (which is also the median and one of the modes) | |
void | setParams (double a, double b) |
Set the parameters of this distribution. | |
Protected Attributes | |
double | m_a |
double | m_b |
This is a continuous uniform distribution.
GClasses::GUniformDistribution::GUniformDistribution | ( | ) | [inline] |
virtual GClasses::GUniformDistribution::~GUniformDistribution | ( | ) | [inline, virtual] |
virtual bool GClasses::GUniformDistribution::isDiscrete | ( | ) | const [inline, virtual] |
Returns false.
Implements GClasses::GUnivariateDistribution.
virtual bool GClasses::GUniformDistribution::isSupported | ( | double | x | ) | const [inline, virtual] |
Returns true iff a <= x < b.
Implements GClasses::GUnivariateDistribution.
virtual double GClasses::GUniformDistribution::likelihood | ( | double | x | ) | [inline, virtual] |
See the comment for GUnivariateDistribution::likelihood.
Implements GClasses::GUnivariateDistribution.
virtual double GClasses::GUniformDistribution::logLikelihood | ( | double | x | ) | [inline, virtual] |
See the comment for GUnivariateDistribution::logLikelihood.
Implements GClasses::GUnivariateDistribution.
double GClasses::GUniformDistribution::mean | ( | ) | const [inline] |
Returns the middle value (which is also the median and one of the modes)
virtual double GClasses::GUniformDistribution::mode | ( | ) | const [inline, virtual] |
Returns the middle value (which is also the mean and median)
Implements GClasses::GUnivariateDistribution.
void GClasses::GUniformDistribution::setParams | ( | double | a, |
double | b | ||
) | [inline] |
Set the parameters of this distribution.
virtual Type GClasses::GUniformDistribution::type | ( | ) | const [inline, virtual] |
Returns the type of distribution.
Implements GClasses::GUnivariateDistribution.
double GClasses::GUniformDistribution::m_a [protected] |
double GClasses::GUniformDistribution::m_b [protected] |