41 #ifndef BPP_NUMERIC_PROB_SIMPLEDISCRETEDISTRIBUTION_H
42 #define BPP_NUMERIC_PROB_SIMPLEDISCRETEDISTRIBUTION_H
130 std::string
getName()
const {
return "Simple";}
146 double qProb(
double x)
const;
148 double pProb(
double x)
const;
Partial implementation of the DiscreteDistribution interface.
std::map< double, double, Order > distribution_
The constraint interface.
The parameter list object.
A Discrete distribution object, where some specific probabilities are assigned to a finite set of val...
SimpleDiscreteDistribution & operator=(const SimpleDiscreteDistribution &)
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution,...
virtual ~SimpleDiscreteDistribution()
SimpleDiscreteDistribution * clone() const
Create a copy of this object and send a pointer to it.
double getLowerBound() const
methods about the range of the definition
std::map< size_t, std::vector< double > > givenRanges_
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
void discretize()
Discretizes the distribution in equiprobable classes.
void restrictToConstraint(const Constraint &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
std::string getName() const
Get the name of the distribution.
const std::map< size_t, std::vector< double > > getRanges() const
double getUpperBound() const
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 qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that .