5 #ifndef BPP_PHYL_MODEL_MIXTUREOFASUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_MIXTUREOFASUBSTITUTIONMODEL_H
37 std::shared_ptr<const Alphabet> alpha,
38 std::unique_ptr<SubstitutionModelInterface>
model,
39 std::map<std::string, std::unique_ptr<DiscreteDistributionInterface>>& parametersDistributionsList,
73 vd.push_back(1 /
subNModel(j).Qij(
static_cast<size_t>(
from_),
static_cast<size_t>(
to_)));
const TransitionModelInterface & nModel(size_t i) const override
Returns a specific model from the mixture.
virtual void setVRates(const Vdouble &vd) override
Sets the rates of the submodels to be proportional to a given vector, with the constraint that the me...
std::vector< std::shared_ptr< TransitionModelInterface > > modelsContainer_
vector of pointers to TransitionModels.
std::string getNamespace() const override
Partial implementation of the TransitionModel interface.
std::shared_ptr< const StateMapInterface > getStateMap() const override
const SubstitutionModelInterface & subModel(const std::string &name) const
retrieve a pointer to the substitution model with the given name.
MixtureOfASubstitutionModel(std::shared_ptr< const Alphabet > alpha, std::unique_ptr< SubstitutionModelInterface > model, std::map< std::string, std::unique_ptr< DiscreteDistributionInterface >> ¶metersDistributionsList, int ffrom=-1, int tto=-1)
Constructor of a MixtureOfASubstitutionModel, where all the models have rate 1 and equal probability.
MixtureOfASubstitutionModel(const MixtureOfASubstitutionModel &model)
MixtureOfASubstitutionModel & operator=(const MixtureOfASubstitutionModel &model)
void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
MixtureOfASubstitutionModel * clone() const override
const SubstitutionModelInterface & subNModel(size_t i) const
Transition models defined as a mixture of nested substitution models.
void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
MixtureOfATransitionModel & operator=(const MixtureOfATransitionModel &)
const TransitionModelInterface & model(const std::string &name) const override
retrieve a pointer to the submodel with the given name.
Interface for all substitution models.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble