5 #ifndef BPP_PHYL_MODEL_MIXTUREOFATRANSITIONMODEL_H
6 #define BPP_PHYL_MODEL_MIXTUREOFATRANSITIONMODEL_H
72 std::map<std::string, std::unique_ptr<DiscreteDistributionInterface>>
distributionMap_;
79 std::shared_ptr<const Alphabet> alpha,
80 std::unique_ptr<TransitionModelInterface>
model,
81 std::map<std::string, std::unique_ptr<DiscreteDistributionInterface>>& parametersDistributionsList,
82 int ffrom = -1,
int tto = -1);
93 std::string
getName()
const override {
return "MixedModel"; }
102 for (
size_t i = 0; i < nbmod; ++i)
109 throw NullPointerException(
"MixtureOfATransitionModel::model(). No model with the specified name.");
131 void setFreq(std::map<int, double>&)
override;
153 throw Exception(
"MixtureOfATransitionModel::distribution(). No distribution with name: '" + parName +
"'.");
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.
virtual size_t getNumberOfModels() const override
returns the number of models in the mixture
virtual std::string getName() const =0
Get the name of the model.
Transition models defined as a mixture of nested substitution models.
std::string getName() const override
Get the name of the model.
int from() const
Numbers of the states between which the substitution rates of all the submodels must be equal....
void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
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(size_t i) const
virtual ~MixtureOfATransitionModel()
const DiscreteDistributionInterface & distribution(std::string &parName) const
returns the DiscreteDistribution associated with a given parameter name.
MixtureOfATransitionModel & operator=(const MixtureOfATransitionModel &)
void setFreq(std::map< int, double > &) override
sets the eq frequencies of the first nested model, and adapts the parameters at best to it (surely th...
bool hasDistribution(std::string &parName) const
Tells whether a DiscreteDistribution is associated with a given parameter name.
std::map< std::string, std::unique_ptr< DiscreteDistributionInterface > > distributionMap_
MixtureOfATransitionModel(std::shared_ptr< const Alphabet > alpha, std::unique_ptr< TransitionModelInterface > model, std::map< std::string, std::unique_ptr< DiscreteDistributionInterface >> ¶metersDistributionsList, int ffrom=-1, int tto=-1)
const TransitionModelInterface & model(const std::string &name) const override
retrieve a pointer to the submodel with the given name.
MixtureOfATransitionModel * clone() const override
Interface for all transition models.
Defines the basic types of data flow nodes.
std::vector< unsigned int > Vuint