40 #ifndef _MIXTUREOFSUBSTITUTIONMODELS_H_ 41 #define _MIXTUREOFSUBSTITUTIONMODELS_H_ 43 #include <Bpp/Numeric/VectorTools.h> 131 const Alphabet* alpha,
132 std::vector<SubstitutionModel*> vpModel);
149 const Alphabet* alpha,
150 std::vector<SubstitutionModel*> vpModel,
151 Vdouble& vproba, Vdouble& vrate);
162 std::string
getName()
const {
return "Mixture"; }
173 virtual void setVRates(
const Vdouble& vd);
188 void setFreq(std::map<int, double>&);
193 #endif // _MIXTUREOFSUBSTITUTIONMODELS_H_ void setFreq(std::map< int, double > &)
applies setFreq to all the models of the mixture and recovers the parameters values.
MixtureOfSubstitutionModels & operator=(const MixtureOfSubstitutionModels &)
void updateMatrices()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
virtual ~MixtureOfSubstitutionModels()
MixtureOfSubstitutionModels * clone() const
Partial implementation for Mixed Substitution models, defined as a mixture of "simple" substitution m...
MixtureOfSubstitutionModels(const Alphabet *alpha, std::vector< SubstitutionModel *> vpModel)
Constructor of a MixtureOfSubstitutionModels, where all the models have rate 1 and equal probability...
Vint getSubmodelNumbers(std::string &desc) const
Returns the vector of numbers of the submodels in the mixture that match a description of the paramet...
virtual void setVRates(const Vdouble &vd)
Sets the rates of the submodels to follow the constraint that the mean rate of the mixture equals rat...
Substitution models defined as a mixture of several substitution models.
std::string getName() const
Get the name of the model.