5 #ifndef BPP_NUMERIC_PROB_BETADISCRETEDISTRIBUTION_H 6 #define BPP_NUMERIC_PROB_BETADISCRETEDISTRIBUTION_H 9 #include "../Random/RandomTools.h" 55 std::string
getName()
const override {
return "Beta";}
69 double qProb(
double x)
const override;
71 double pProb(
double x)
const override;
76 #endif // BPP_NUMERIC_PROB_BETADISCRETEDISTRIBUTION_H Partial implementation of the DiscreteDistribution interface.
BetaDiscreteDistribution * clone() const override
Create a copy of this object and send a pointer to it.
BetaDiscreteDistribution(size_t n, double alpha=1, double beta=1, short discretization=DISCRETIZATION_EQUAL_PROB_WHEN_POSSIBLE)
Build a new discretized beta distribution.
double Expectation(double a) const override
Return a primitive function used for the expectation of the continuous version of the distribution...
Discretized Beta distribution with parameters alpha and beta, on a given interval. On default, the interval is , but it can be restricted.
BetaDiscreteDistribution & operator=(const BetaDiscreteDistribution &)=default
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.
static short DISCRETIZATION_EQUAL_PROB_WHEN_POSSIBLE
void fireParameterChanged(const ParameterList ¶meters) override
Notify the class when one or several parameters have changed.
double qProb(double x) const override
Return the quantile of the continuous version of the distribution, ie y such that ...
double pProb(double x) const override
Return the cumulative quantile of the continuous version of the distribution, ie .
std::string getName() const override
Get the name of the distribution.
double randC() const override
Draw a random number from the continuous version of this distribution, if it exists.