40 #ifndef _MIXTUREOFDISCRETEDISTRIBUTIONS_H_ 41 #define _MIXTUREOFDISCRETEDISTRIBUTIONS_H_ 73 std::vector<DiscreteDistribution*>
vdd_;
100 #if defined(NO_VIRTUAL_COV) 107 std::string
getName()
const {
return "Mixture"; }
147 double qProb(
double x)
const;
149 double pProb(
double x)
const;
166 #endif // _MIXTUREOFDISCRETEDISTRIBUTIONS_H__ MixtureOfDiscreteDistributions & operator=(const MixtureOfDiscreteDistributions &mdd)
double getNProbability(size_t n) const
Returns the probability of the n-th discrete distribution in the mixture.
~MixtureOfDiscreteDistributions()
void setNumberOfCategories(size_t nbClasses)
sets the number of categories of EACH submodel to nbClasses, so the number of categories of the mixtu...
Partial implementation of the DiscreteDistribution interface.
This class allows to perform a correspondence analysis.
Interface for discrete distribution objects.
void setNamespace(const std::string &prefix)
Set the namespace for the parameter names.
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
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...
double qProb(double x) const
Return the quantile of the continuous version of the distribution, ie y such that ...
void updateDistribution()
void restrictToConstraint(const Constraint &c)
Restricts the distribution to the domain where the constraint is respected, in addition of other pred...
A Discrete distribution object defined by a vector of Discrete Distributions and a set of probabiliti...
The parameter list object.
size_t getNumberOfDistributions() const
Returns the number of discrete distributions in the mixture.
std::string getName() const
Get the name of the distribution.
The constraint interface.
MixtureOfDiscreteDistributions(const std::vector< DiscreteDistribution *> &distributions, const std::vector< double > &probas)
Builds a new MixtureOfDiscreteDistributions object from a vector of Discrete Distributions and a vect...
The Clonable interface (allow an object to be cloned).
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...
std::vector< DiscreteDistribution * > vdd_
MixtureOfDiscreteDistributions * clone() const
Create a copy of this object and send a pointer to it.
void discretize()
Discretizes the distribution in equiprobable classes.
const DiscreteDistribution * getNDistribution(size_t n) const
Returns a pointer to the n-th discrete distribution in the mixture.
std::vector< double > probas_
std::vector< std::string > vNestedPrefix_