5 #include "../../Utils/MapTools.h" 6 #include "../NumConstants.h" 7 #include "../Random/RandomTools.h" 33 throw Exception(
"At least 2 classes for Gamma discrete distribution.");
35 addParameter_(
new Parameter(
"Gamma.alpha", alpha, std::make_shared<IntervalConstraint>(1, minimumAlpha,
true)));
36 addParameter_(
new Parameter(
"Gamma.beta", beta, std::make_shared<IntervalConstraint>(1, minimumBeta,
true)));
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution...
Partial implementation of the DiscreteDistribution interface.
This class is designed to facilitate the manipulation of parameters.
void addParameter_(Parameter *parameter)
virtual ~GammaDiscreteDistribution()
double getParameterValue(const std::string &name) const override
Get the value for parameter of name 'name'.
The parameter list object.
virtual void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
AbstractDiscreteDistribution & operator=(const AbstractDiscreteDistribution &adde)
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.
GammaDiscreteDistribution & operator=(const GammaDiscreteDistribution &)
GammaDiscreteDistribution(size_t n, double alpha=1., double beta=1., double minimumAlpha=0.05, double minimumBeta=0.05, bool paramOffset=false, double offset=0)
Build a new discretized gamma distribution.
bool hasParameter(const std::string &name) const override
Tell if there is a parameter with specified name.
virtual void discretize()
Discretizes the distribution in equiprobable classes.
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
Discretized Gamma distribution with an offset.
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that ...
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.