5 #ifndef BPP_NUMERIC_PROB_SIMPLEDISCRETEDISTRIBUTION_H 6 #define BPP_NUMERIC_PROB_SIMPLEDISCRETEDISTRIBUTION_H 94 std::string
getName()
const {
return "Simple";}
110 double qProb(
double x)
const;
112 double pProb(
double x)
const;
119 #endif // BPP_NUMERIC_PROB_SIMPLEDISCRETEDISTRIBUTION_H std::string getName() const
Get the name of the distribution.
Partial implementation of the DiscreteDistribution interface.
const std::map< size_t, std::vector< double > > getRanges() const
std::map< size_t, std::vector< double > > givenRanges_
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that ...
The constraint interface.
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
SimpleDiscreteDistribution & operator=(const SimpleDiscreteDistribution &)
virtual ~SimpleDiscreteDistribution()
SimpleDiscreteDistribution * clone() const
Create a copy of this object and send a pointer to it.
The parameter list object.
A Discrete distribution object, where some specific probabilities are assigned to a finite set of val...
void discretize()
Discretizes the distribution in equiprobable classes.
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution...
std::map< double, double, Order > distribution_
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
SimpleDiscreteDistribution(const std::map< double, double > &distribution, double precision=NumConstants::TINY(), bool fixed=false)
Builds a new SimpleDiscreteDistribution object from a map<double,double> object. With this constructo...
double getLowerBound() const
methods about the range of the definition
double getUpperBound() const
void restrictToConstraint(const ConstraintInterface &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...