5 #ifndef BPP_PHYL_MODEL_MIXTUREOFTRANSITIONMODELS_H
6 #define BPP_PHYL_MODEL_MIXTUREOFTRANSITIONMODELS_H
100 std::shared_ptr<const Alphabet> alpha,
101 std::vector<std::unique_ptr<TransitionModelInterface>>& vpModel);
117 std::shared_ptr<const Alphabet> alpha,
118 std::vector<std::unique_ptr<TransitionModelInterface>>& vpModel,
133 std::string
getName()
const override {
return "Mixture"; }
169 void setFreq(std::map<int, double>&)
override;
Partial implementation for Mixed Transition models, defined as a mixture of "simple" substitution mod...
const TransitionModelInterface & nModel(size_t i) const override
Returns a specific model from the mixture.
Transition models defined as a mixture of several substitution models.
virtual void setVRates(const Vdouble &vd) override
Sets the rates of the submodels to follow the constraint that the mean rate of the mixture equals rat...
void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
MixtureOfTransitionModels(std::shared_ptr< const Alphabet > alpha, std::vector< std::unique_ptr< TransitionModelInterface >> &vpModel)
Constructor of a MixtureOfTransitionModels, where all the models have rate 1 and equal probability.
MixtureOfTransitionModels & operator=(const MixtureOfTransitionModels &)
virtual ~MixtureOfTransitionModels()
std::string getName() const override
Get the name of the model.
void setFreq(std::map< int, double > &) override
applies setFreq to all the models of the mixture and recovers the parameters values.
MixtureOfTransitionModels * clone() const override
const TransitionModelInterface & model(size_t i) const
Vuint getSubmodelNumbers(const std::string &desc) const override
Returns the vector of numbers of the submodels in the mixture that match a description of the paramet...
const TransitionModelInterface & model(const std::string &name) const override
retrieve a pointer to the submodel with the given name.
Interface for all transition models.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< unsigned int > Vuint