5 #ifndef BPP_NUMERIC_PROB_CONSTANTDISTRIBUTION_H 6 #define BPP_NUMERIC_PROB_CONSTANTDISTRIBUTION_H 51 std::string
getName()
const {
return "Constant"; }
59 double pProb(
double x)
const {
return x < value_ ? 0 : 1; }
61 double Expectation(
double a)
const {
return a < value_ ? 0 : 1; }
68 #endif // BPP_NUMERIC_PROB_CONSTANTDISTRIBUTION_H ConstantDistribution & operator=(const ConstantDistribution &)
Partial implementation of the DiscreteDistribution interface.
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
The constraint interface.
void discretize()
Discretizes the distribution in equiprobable classes.
The parameter list object.
ConstantDistribution * clone() const
Create a copy of this object and send a pointer to it.
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution...
ConstantDistribution(double value)
Builds a new ConstantDistribution object from a value.
std::string getName() const
Get the name of the distribution.
Constant discrete distribution.
virtual ~ConstantDistribution()
void restrictToConstraint(const ConstraintInterface &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that ...
double randC() const
Draw a random number from the continuous version of this distribution, if it exists.
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
double getLowerBound() const
methods about the range of the definition
double getUpperBound() const