5 #ifndef BPP_NUMERIC_PROB_GAMMADISCRETEDISTRIBUTION_H 6 #define BPP_NUMERIC_PROB_GAMMADISCRETEDISTRIBUTION_H 9 #include "../Constraints.h" 10 #include "../Random/RandomTools.h" 33 std::string
getName()
const {
return "Gamma";}
55 GammaDiscreteDistribution(
size_t n,
double alpha = 1.,
double beta = 1.,
double minimumAlpha = 0.05,
double minimumBeta = 0.05,
bool paramOffset =
false,
double offset = 0);
78 double qProb(
double x)
const;
80 double pProb(
double x)
const;
85 #endif // BPP_NUMERIC_PROB_GAMMADISCRETEDISTRIBUTION_H 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.
std::string getName() const
Get the name of the distribution.
GammaDiscreteDistribution * clone() const
Create a copy of this object and send a pointer to it.
virtual ~GammaDiscreteDistribution()
double getParameterValue(const std::string &name) const override
Get the value for parameter of name 'name'.
The parameter list object.
std::shared_ptr< IntervalConstraint > intMinMax_
the interval where the distribution is defined/restricted.
GammaDiscreteDistribution & operator=(const GammaDiscreteDistribution &)
double randC() const
Draw a random number from the continuous version of this distribution, if it exists.
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.
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.