41 #ifndef BPP_NUMERIC_PROB_INVARIANTMIXEDDISCRETEDISTRIBUTION_H
42 #define BPP_NUMERIC_PROB_INVARIANTMIXEDDISCRETEDISTRIBUTION_H
101 std::string
getName()
const {
return "Invariant"; }
Partial implementation of the DiscreteDistribution interface.
AbstractDiscreteDistribution & operator=(const AbstractDiscreteDistribution &adde)
The constraint interface.
Interface for discrete distribution objects.
virtual void setMedian(bool median)=0
Sets the median value to true to say that the value in a class is proportional to the median value of...
virtual void discretize()=0
Discretizes the distribution in equiprobable classes.
virtual void setNumberOfCategories(size_t nbClasses)=0
sets the number of categories and discretizes if there is a change in this number.
DiscreteDistribution * clone() const =0
Create a copy of this object and send a pointer to it.
virtual double Expectation(double a) const =0
Return a primitive function used for the expectation of the continuous version of the distribution,...
virtual double pProb(double x) const =0
Return the cumulative quantile of the continuous version of the distribution, ie .
virtual double qProb(double x) const =0
Return the quantile of the continuous version of the distribution, ie y such that .
Discrete mixed distribution, with a one-category fixed value (called "invariant") and a user-specifie...
void updateDistribution()
std::string nestedPrefix_
void discretize()
Discretizes the distribution in equiprobable classes.
InvariantMixedDiscreteDistribution & operator=(const InvariantMixedDiscreteDistribution &imdd)
std::string getName() const
Get the name of the distribution.
const DiscreteDistribution * getVariableSubDistribution() const
virtual ~InvariantMixedDiscreteDistribution()
void restrictToConstraint(const Constraint &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
InvariantMixedDiscreteDistribution(const InvariantMixedDiscreteDistribution &imdd)
double pProb(double x) const
Return the cumulative quantile of the continuous version of the distribution, ie .
void setNamespace(const std::string &prefix)
Set the namespace for the parameter names.
void setNumberOfCategories(size_t nbClasses)
double Expectation(double a) const
Return a primitive function used for the expectation of the continuous version of the distribution,...
InvariantMixedDiscreteDistribution * clone() const
Create a copy of this object and send a pointer to it.
DiscreteDistribution * dist_
void setMedian(bool median)
Sets the median value to true to say that the value in a class is proportional to the median value of...
InvariantMixedDiscreteDistribution(DiscreteDistribution *dist, double p, double invariant=0.)
Build a new InvariantMixedDiscreteDistribution object.
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that .
The parameter list object.