41 #ifndef BPP_NUMERIC_PROB_GAMMADISCRETEDISTRIBUTION_H
42 #define BPP_NUMERIC_PROB_GAMMADISCRETEDISTRIBUTION_H
45 #include "../Constraints.h"
46 #include "../Random/RandomTools.h"
69 std::string
getName()
const {
return "Gamma";}
91 GammaDiscreteDistribution(
size_t n,
double alpha = 1.,
double beta = 1.,
double minimumAlpha = 0.05,
double minimumBeta = 0.05,
bool paramOffset =
false,
double offset = 0);
114 double qProb(
double x)
const;
116 double pProb(
double x)
const;
Partial implementation of the DiscreteDistribution interface.
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.
double getParameterValue(const std::string &name) const
Get the value for parameter of name 'name'.
Discretized Gamma distribution with an offset.
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.
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
GammaDiscreteDistribution & operator=(const GammaDiscreteDistribution &)
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution,...
GammaDiscreteDistribution * clone() const
Create a copy of this object and send a pointer to it.
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
double randC() const
Draw a random number from the continuous version of this distribution, if it exists.
std::string getName() const
Get the name of the distribution.
virtual ~GammaDiscreteDistribution()
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that .
The parameter list object.