5 #ifndef BPP_PHYL_MODEL_ABSTRACTBIBLIOMIXEDTRANSITIONMODEL_H
6 #define BPP_PHYL_MODEL_ABSTRACTBIBLIOMIXEDTRANSITIONMODEL_H
43 std::shared_ptr<const TransitionModelInterface>
getNModel(
size_t i)
const override
Abstract class for mixture models based on the bibliography.
double getNRate(size_t i) const override
Returns the rate of a specific model from the mixture.
void setNProbability(size_t i, double prob) override
Sets the probabilities of the submodels of the mixture.
void normalizeVRates() override
normalizes the rates of the submodels.
AbstractBiblioMixedTransitionModel & operator=(const AbstractBiblioMixedTransitionModel &model)
void setVRates(const Vdouble &vd) override
sets the rates of the submodels.
Vuint getSubmodelNumbers(const std::string &desc) const override
Returns the vector of numbers of the submodels in the mixture that match a description.
const std::vector< double > & getProbabilities() const override
Returns the vector of the probabilities of the submodels of the mixture.
virtual ~AbstractBiblioMixedTransitionModel()
MixedTransitionModelInterface & mixedModel_()
TransitionModelInterface & nModel_(size_t i) override
const TransitionModelInterface & transitionModel() const override
const std::vector< double > & getVRates() const override
Returns the vector of all the rates of the mixture.
const MixedTransitionModelInterface & mixedModel() const
const TransitionModelInterface & model(const std::string &name) const override
Access the submodel with the given name.
const TransitionModelInterface & nModel(size_t i) const override
Returns the submodel from the mixture.
size_t getNumberOfModels() const override
Returns the number of submodels.
std::unique_ptr< MixedTransitionModelInterface > mixedModelPtr_
TransitionModelInterface & transitionModel_() override
const FrequencySetInterface & frequencySet() const override
double getNProbability(size_t i) const override
Returns the probability of a specific model from the mixture.
std::shared_ptr< const TransitionModelInterface > getNModel(size_t i) const override
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
const BranchModelInterface & model() const override
Parametrize a set of state frequencies.
Interface for Transition models, defined as a mixture of "simple" transition models.
virtual double getNProbability(size_t i) const =0
Returns the probability of a specific model from the mixture.
virtual const std::vector< double > & getProbabilities() const =0
virtual double getNRate(size_t i) const =0
Returns the rate of a specific submodel.
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 const std::vector< double > & getVRates() const =0
Returns the rates of the submodels.
virtual const TransitionModelInterface & nModel(size_t i) const =0
Returns a specific model from the mixture.
virtual void setNProbability(size_t i, double prob)=0
Sets the probability of a specific model from the mixture.
virtual void normalizeVRates()=0
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_.
friend class AbstractBiblioMixedTransitionModel
virtual TransitionModelInterface & nModel_(size_t i)=0
virtual std::shared_ptr< const TransitionModelInterface > getNModel(size_t i) const =0
virtual size_t getNumberOfModels() const =0
virtual const TransitionModelInterface & model(const std::string &name) const =0
Access the submodel with the given name.
Interface for all transition models.
virtual const BranchModelInterface & model() const =0
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< unsigned int > Vuint