5 #ifndef BPP_PHYL_MODEL_MIXEDTRANSITIONMODEL_H
6 #define BPP_PHYL_MODEL_MIXEDTRANSITIONMODEL_H
38 virtual std::shared_ptr<const TransitionModelInterface>
getNModel(
size_t i)
const = 0;
57 virtual const std::vector<double>&
getVRates()
const = 0;
Abstract class for mixture models based on the bibliography.
SubModel taken from a MixedTransitionModel, kept in the context of the MixedTransitionModel (see From...
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.
MixedTransitionModelInterface()
virtual MixedTransitionModelInterface * clone() const override=0
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_.
virtual Vuint getSubmodelNumbers(const std::string &desc) const =0
Returns the vector of numbers of the submodels in the mixture that match a description.
virtual TransitionModelInterface & nModel_(size_t i)=0
virtual ~MixedTransitionModelInterface()
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.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< unsigned int > Vuint