40 #ifndef _ABSTRACTBIBLIOMIXEDSUBSTITUTIONMODEL_H_ 41 #define _ABSTRACTBIBLIOMIXEDSUBSTITUTIONMODEL_H_ 66 #ifndef NO_VIRTUAL_COV 173 #endif // _AbstractBiblioMixedSubstitutionModel_H_ void setVRates(const Vdouble &vd)
sets the rates of the submodels.
Interface for all substitution models.
Abstract class for mixture models based on the bibliography.
void normalizeVRates()
normalizes the rates of the submodels.
virtual double getNProbability(size_t i) const =0
Returns the probability of a specific model from the mixture.
virtual AbstractBiblioMixedSubstitutionModel * clone() const =0
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
const std::vector< double > & getProbabilities() const
Returns the vector of the probabilities of the submodels of the mixture.
const SubstitutionModel * getNModel(size_t i) const
Returns a specific model from the mixture.
double getNRate(size_t i) const
Returns the rate of a specific model from the mixture.
virtual const std::vector< double > & getVRates() const =0
Returns the rates of the submodels.
void setNProbability(size_t i, double prob)
Sets the probabilities of the submodels of the mixture.
Vint getSubmodelNumbers(std::string &desc) const
virtual void normalizeVRates()=0
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_...
AbstractBiblioMixedSubstitutionModel & operator=(const AbstractBiblioMixedSubstitutionModel &model)
virtual void setNProbability(size_t i, double prob)=0
Sets the probability of a specific model from the mixture.
virtual const std::vector< double > & getProbabilities() const =0
double getNProbability(size_t i) const
Returns the probability of a specific model from the mixture.
const std::vector< double > & getVRates() const
Returns the vector of all the rates of the mixture.
virtual void setVRates(const Vdouble &vd)=0
Sets the rates of the submodels to be proportional to a given vector, and normalizes them so that the...
virtual double getNRate(size_t i) const =0
Returns the rate of a specific submodel.
virtual ~AbstractBiblioMixedSubstitutionModel()
SubstitutionModel * getNModel(size_t i)
virtual const MixedSubstitutionModel & getMixedModel() const =0
virtual size_t getNumberOfModels() const =0
AbstractBiblioMixedSubstitutionModel(const std::string &prefix)
size_t getNumberOfModels() const
Returns the number of submodels.
virtual const SubstitutionModel * getNModel(size_t i) const =0
Returns a specific model from the mixture.
Interface for Substitution models, defined as a mixture of "simple" substitution models.