bpp-phyl3  3.0.0
bpp::MixtureOfASubstitutionModel Class Referenceabstract

#include <Bpp/Phyl/Model/MixtureOfASubstitutionModel.h>

+ Inheritance diagram for bpp::MixtureOfASubstitutionModel:
+ Collaboration diagram for bpp::MixtureOfASubstitutionModel:

Public Member Functions

 MixtureOfASubstitutionModel (std::shared_ptr< const Alphabet > alpha, std::unique_ptr< SubstitutionModelInterface > model, std::map< std::string, std::unique_ptr< DiscreteDistributionInterface >> &parametersDistributionsList, int ffrom=-1, int tto=-1)
 Constructor of a MixtureOfASubstitutionModel, where all the models have rate 1 and equal probability. More...
 
 MixtureOfASubstitutionModel (const MixtureOfASubstitutionModel &model)
 
MixtureOfASubstitutionModeloperator= (const MixtureOfASubstitutionModel &model)
 
MixtureOfASubstitutionModelclone () const override
 
const SubstitutionModelInterfacesubModel (const std::string &name) const
 retrieve a pointer to the substitution model with the given name. More...
 
const SubstitutionModelInterfacesubNModel (size_t i) const
 
std::string getName () const override
 Get the name of the model. More...
 
const TransitionModelInterfacemodel (const std::string &name) const override
 retrieve a pointer to the submodel with the given name. More...
 
const TransitionModelInterfacemodel (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 parameters numbers. More...
 
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 there is a better way to manage this). More...
 
bool hasDistribution (std::string &parName) const
 Tells whether a DiscreteDistribution is associated with a given parameter name. More...
 
const DiscreteDistributionInterfacedistribution (std::string &parName) const
 returns the DiscreteDistribution associated with a given parameter name. More...
 
int from () const
 Numbers of the states between which the substitution rates of all the submodels must be equal. If they are set to -1, this constraint does not exist among the submodels. More...
 
int to () const
 
virtual size_t getNumberOfModels () const override
 returns the number of models in the mixture More...
 
const TransitionModelInterfacenModel (size_t i) const override
 Returns a specific model from the mixture. More...
 
std::shared_ptr< const TransitionModelInterfacegetNModel (size_t i) const override
 
double getNRate (size_t i) const override
 Returns the rate of a specific model from the mixture. More...
 
virtual void setRate (double rate) override
 Set the rate of the model and the submodels. More...
 
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 mean rate of the mixture equals rate_. More...
 
virtual void normalizeVRates () override
 Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_. More...
 
const std::vector< double > & getVRates () const override
 Returns the vector of all the rates of the mixture. More...
 
virtual double getNProbability (size_t i) const override
 Returns the probability of a specific model from the mixture. More...
 
virtual const std::vector< double > & getProbabilities () const override
 Returns the vector of probabilities. More...
 
virtual void setNProbability (size_t i, double prob) override
 Sets the probability of a specific model from the mixture. More...
 
virtual const Matrix< double > & getPij_t (double t) const override
 From TransitionModel interface. More...
 
virtual const Matrix< double > & getdPij_dt (double t) const override
 
virtual const Matrix< double > & getd2Pij_dt2 (double t) const override
 
bool computeFrequencies () const override
 
void computeFrequencies (bool yn) override
 
void setFreqFromData (const SequenceDataInterface &data, double pseudoCount) override
 Set equilibrium frequencies equal to the frequencies estimated from the data. More...
 
virtual double freq (size_t i) const =0
 
virtual double freq (size_t i) const override
 
virtual double Pij_t (size_t i, size_t j, double t) const =0
 
virtual double Pij_t (size_t i, size_t j, double t) const override
 
virtual double dPij_dt (size_t i, size_t j, double t) const =0
 
virtual double dPij_dt (size_t i, size_t j, double t) const override
 
virtual double d2Pij_dt2 (size_t i, size_t j, double t) const =0
 
virtual double d2Pij_dt2 (size_t i, size_t j, double t) const override
 
virtual const VdoublegetFrequencies () const =0
 
const VdoublegetFrequencies () const override
 
virtual const Eigen::VectorXd & Lik_t (const Eigen::VectorXd &values, double t) const =0
 
const Eigen::VectorXd & Lik_t (const Eigen::VectorXd &values, double t) const override
 
virtual const Eigen::VectorXd & dLik_dt (const Eigen::VectorXd &values, double t) const =0
 
const Eigen::VectorXd & dLik_dt (const Eigen::VectorXd &values, double t) const override
 
virtual const Eigen::VectorXd & d2Lik_dt2 (const Eigen::VectorXd &values, double t) const =0
 
const Eigen::VectorXd & d2Lik_dt2 (const Eigen::VectorXd &values, double t) const override
 
virtual const std::vector< int > & getAlphabetStates () const =0
 
const std::vector< int > & getAlphabetStates () const override
 
virtual const StateMapInterfacestateMap () const =0
 
const StateMapInterfacestateMap () const override
 
virtual std::shared_ptr< const StateMapInterfacegetStateMap () const =0
 
std::shared_ptr< const StateMapInterfacegetStateMap () const override
 
virtual std::vector< size_t > getModelStates (int code) const =0
 Get the state in the model corresponding to a particular state in the alphabet. More...
 
virtual std::vector< size_t > getModelStates (const std::string &code) const =0
 Get the state in the model corresponding to a particular state in the alphabet. More...
 
std::vector< size_t > getModelStates (int code) const override
 Get the state in the model corresponding to a particular state in the alphabet. More...
 
std::vector< size_t > getModelStates (const std::string &code) const override
 Get the state in the model corresponding to a particular state in the alphabet. More...
 
virtual int getAlphabetStateAsInt (size_t index) const =0
 
int getAlphabetStateAsInt (size_t index) const override
 
virtual std::string getAlphabetStateAsChar (size_t index) const =0
 
std::string getAlphabetStateAsChar (size_t index) const override
 
virtual const Alphabetalphabet () const =0
 
const Alphabetalphabet () const override
 
virtual std::shared_ptr< const AlphabetgetAlphabet () const =0
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
virtual const FrequencySetInterfacefrequencySet () const =0
 
const FrequencySetInterfacefrequencySet () const override
 
virtual size_t getNumberOfStates () const =0
 Get the number of states. More...
 
size_t getNumberOfStates () const override
 Get the number of states. More...
 
virtual double getInitValue (size_t i, int state) const =0
 
double getInitValue (size_t i, int state) const override
 
virtual double getRate () const =0
 Get the rate. More...
 
virtual double getRate () const override
 The rate of the substitution process. More...
 
virtual void addRateParameter ()=0
 
void addRateParameter () override
 add a "rate" parameter to the model, that handles the overall rate of the process. More...
 
virtual size_t getNumberOfIndependentParameters () const=0
 
size_t getNumberOfIndependentParameters () const
 
virtual void aliasParameters (const std::string &p1, const std::string &p2)=0
 
virtual void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)=0
 
void aliasParameters (const std::string &p1, const std::string &p2)
 
void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)
 
virtual void unaliasParameters (const std::string &p1, const std::string &p2)=0
 
void unaliasParameters (const std::string &p1, const std::string &p2)
 
virtual const ParameterListgetIndependentParameters () const=0
 
const ParameterListgetIndependentParameters () const
 
virtual std::vector< std::string > getAlias (const std::string &name) const=0
 
virtual std::vector< std::string > getAlias (const std::string &name) const
 
virtual std::map< std::string, std::string > getAliases () const=0
 
virtual std::map< std::string, std::string > getAliases () const
 
virtual bool hasParameter (const std::string &name) const=0
 
bool hasParameter (const std::string &name) const override
 
virtual const ParameterListgetParameters () const=0
 
const ParameterListgetParameters () const override
 
virtual const Parameterparameter (const std::string &name) const=0
 
const Parameterparameter (const std::string &name) const override
 
virtual double getParameterValue (const std::string &name) const=0
 
double getParameterValue (const std::string &name) const override
 
virtual void setAllParametersValues (const ParameterList &parameters)=0
 
void setAllParametersValues (const ParameterList &parameters) override
 
virtual void setParameterValue (const std::string &name, double value)=0
 
void setParameterValue (const std::string &name, double value) override
 
virtual void setParametersValues (const ParameterList &parameters)=0
 
void setParametersValues (const ParameterList &parameters) override
 
virtual bool matchParametersValues (const ParameterList &parameters)=0
 
bool matchParametersValues (const ParameterList &parameters) override
 
virtual void removeConstraint (const std::string &name)=0
 
void removeConstraint (const std::string &name) override
 
virtual void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
virtual size_t getNumberOfParameters () const=0
 
size_t getNumberOfParameters () const override
 
virtual void setNamespace (const std::string &prefix)=0
 
void setNamespace (const std::string &prefix)
 
virtual std::string getNamespace () const=0
 
std::string getNamespace () const override
 
virtual std::string getParameterNameWithoutNamespace (const std::string &name) const=0
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
virtual void fireParameterChanged (const ParameterList &parameters) override
 Tells the model that a parameter value has changed. More...
 
void setVerboseLevel (short level)
 
short verboseLevel () const
 
bool hasIndependentParameter (const std::string &name) const
 
ParameterList getAliasedParameters (const ParameterList &pl) const
 
ParameterList getFromParameters (const ParameterList &pl) const
 
std::string getFrom (const std::string &name) const
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 

Protected Member Functions

void updateMatrices_ () override
 Diagonalize the $Q$ matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVectors_ matrices. More...
 
TransitionModelInterfacenModel_ (size_t i) override
 
virtual VdoublegetFrequencies_ ()=0
 
VdoublegetFrequencies_ () override
 
virtual ParameterListgetParameters_ ()=0
 
ParameterListgetParameters_ () override
 
const std::shared_ptr< Parameter > & getParameter (size_t i) const
 
std::shared_ptr< Parameter > & getParameter (size_t i)
 
void addParameter_ (Parameter *parameter)
 
void addParameters_ (const ParameterList &parameters)
 
void shareParameter_ (const std::shared_ptr< Parameter > &parameter)
 
void shareParameters_ (const ParameterList &parameters)
 
void includeParameters_ (const ParameterList &parameters)
 
void deleteParameter_ (size_t index)
 
void deleteParameter_ (std::string &name)
 
void deleteParameters_ (const std::vector< std::string > &names)
 
void resetParameters_ ()
 
ParametergetParameter_ (const std::string &name)
 
ParametergetParameter_ (size_t index)
 
const ParametergetParameter_ (size_t index) const
 
ParametergetParameterWithNamespace_ (const std::string &name)
 
const ParametergetParameterWithNamespace_ (const std::string &name) const
 

Protected Attributes

int from_
 
int to_
 
std::vector< std::shared_ptr< TransitionModelInterface > > modelsContainer_
 vector of pointers to TransitionModels. More...
 
std::vector< double > vProbas_
 vector of the probabilities of the models More...
 
std::vector< double > vRates_
 vector of the rates of the models. More...
 
std::shared_ptr< const Alphabetalphabet_
 The alphabet relevant to this model. More...
 
std::shared_ptr< const StateMapInterfacestateMap_
 The map of model states with alphabet states. More...
 
size_t size_
 The number of states. More...
 
double rate_
 The rate of the model (default: 1). The generator (and all its vectorial components) is independent of the rate, since it should be normalized. More...
 
Vdouble freq_
 The vector $\pi_e$ of equilibrium frequencies. More...
 
RowMatrix< double > pijt_
 These ones are for bookkeeping: More...
 
RowMatrix< double > dpijt_
 
RowMatrix< double > d2pijt_
 
short verboseLevel_
 

Private Attributes

std::map< std::string, std::unique_ptr< DiscreteDistributionInterface > > distributionMap_
 
Eigen::VectorXd lik_
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 

Detailed Description

Definition at line 18 of file MixtureOfASubstitutionModel.h.

Constructor & Destructor Documentation

◆ MixtureOfASubstitutionModel() [1/2]

bpp::MixtureOfASubstitutionModel::MixtureOfASubstitutionModel ( std::shared_ptr< const Alphabet alpha,
std::unique_ptr< SubstitutionModelInterface model,
std::map< std::string, std::unique_ptr< DiscreteDistributionInterface >> &  parametersDistributionsList,
int  ffrom = -1,
int  tto = -1 
)
inline

Constructor of a MixtureOfASubstitutionModel, where all the models have rate 1 and equal probability.

Parameters
alphapointer to the Alphabet
modelpointer to the SubstitutionModel that will be mixed
parametersDistributionsListlist from parameters names towards discrete distributions to will define the mixtures.
ffromindex of the starting codon that will be used to homogenize the rates of the submodels
ttoindex of the arriving codon that will be used to homogenize the rates of the submodels

If ffrom and tto are not -1, for all submodels the transition rate ffrom->tto is the same. Otherwise, all submodels are normalized to have a substitution/time unit at equilibrium.

Definition at line 36 of file MixtureOfASubstitutionModel.h.

Referenced by clone().

◆ MixtureOfASubstitutionModel() [2/2]

bpp::MixtureOfASubstitutionModel::MixtureOfASubstitutionModel ( const MixtureOfASubstitutionModel model)
inline

Definition at line 47 of file MixtureOfASubstitutionModel.h.

Member Function Documentation

◆ addRateParameter() [1/2]

void AbstractTransitionModel::addRateParameter ( )
overridevirtualinherited

add a "rate" parameter to the model, that handles the overall rate of the process.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 63 of file AbstractSubstitutionModel.cpp.

References bpp::AbstractParameterAliasable::addParameter_(), bpp::AbstractParameterAliasable::getNamespace(), bpp::Parameter::R_PLUS_STAR, and bpp::AbstractTransitionModel::rate_.

◆ addRateParameter() [2/2]

◆ alphabet() [1/2]

◆ alphabet() [2/2]

const Alphabet& bpp::AbstractTransitionModel::alphabet ( ) const
inlineoverridevirtualinherited

◆ clone()

MixtureOfASubstitutionModel* bpp::MixtureOfASubstitutionModel::clone ( ) const
inlineoverridevirtual

◆ computeFrequencies() [1/2]

bool bpp::AbstractMixedTransitionModel::computeFrequencies ( ) const
inlineoverridevirtualinherited
Returns
Says if equilibrium frequencies should be computed (all models are likewise, may be refined)

Implements bpp::TransitionModelInterface.

Definition at line 176 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::modelsContainer_.

◆ computeFrequencies() [2/2]

void bpp::AbstractMixedTransitionModel::computeFrequencies ( bool  yn)
inlineoverridevirtualinherited
Returns
Set if equilibrium frequencies should be computed

Implements bpp::TransitionModelInterface.

Definition at line 184 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::modelsContainer_.

◆ d2Lik_dt2() [1/2]

virtual const Eigen::VectorXd& bpp::TransitionModelInterface::d2Lik_dt2 ( const Eigen::VectorXd &  values,
double  t 
) const
pure virtualinherited

◆ d2Lik_dt2() [2/2]

const Eigen::VectorXd& bpp::AbstractLkTransitionModel::d2Lik_dt2 ( const Eigen::VectorXd &  values,
double  t 
) const
inlineoverridevirtualinherited

◆ d2Pij_dt2() [1/2]

◆ d2Pij_dt2() [2/2]

virtual double bpp::AbstractTransitionModel::d2Pij_dt2 ( size_t  i,
size_t  j,
double  t 
) const
inlineoverridevirtualinherited
Returns
The second order derivative of the probability of change from state i to state j with respect to time t, at time t.
See also
getd2Pij_dt2(), getStates()

Implements bpp::TransitionModelInterface.

Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.

Definition at line 199 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::getd2Pij_dt2().

Referenced by bpp::JCprot::d2Pij_dt2().

◆ distribution()

const DiscreteDistributionInterface& bpp::MixtureOfATransitionModel::distribution ( std::string &  parName) const
inlineinherited

returns the DiscreteDistribution associated with a given parameter name.

Parameters
parNamename of the parameter

Definition at line 148 of file MixtureOfATransitionModel.h.

References bpp::MixtureOfATransitionModel::distributionMap_.

◆ dLik_dt() [1/2]

virtual const Eigen::VectorXd& bpp::TransitionModelInterface::dLik_dt ( const Eigen::VectorXd &  values,
double  t 
) const
pure virtualinherited

◆ dLik_dt() [2/2]

const Eigen::VectorXd& bpp::AbstractLkTransitionModel::dLik_dt ( const Eigen::VectorXd &  values,
double  t 
) const
inlineoverridevirtualinherited

◆ dPij_dt() [1/2]

◆ dPij_dt() [2/2]

virtual double bpp::AbstractTransitionModel::dPij_dt ( size_t  i,
size_t  j,
double  t 
) const
inlineoverridevirtualinherited
Returns
The first order derivative of the probability of change from state i to state j with respect to time t, at time t.
See also
getdPij_dt(), getStates()

Implements bpp::TransitionModelInterface.

Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.

Definition at line 198 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::getdPij_dt().

Referenced by bpp::JCprot::dPij_dt().

◆ fireParameterChanged()

virtual void bpp::AbstractTransitionModel::fireParameterChanged ( const ParameterList parameters)
inlineoverridevirtualinherited

Tells the model that a parameter value has changed.

This updates the matrices consequently.

Reimplemented from bpp::AbstractParameterAliasable.

Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::POMO, bpp::YpR, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, bpp::CodonSameAARateSubstitutionModel, bpp::AbstractDFPSubstitutionModel, bpp::SENCA, bpp::KroneckerCodonDistanceSubstitutionModel, bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::CodonDistancePhaseFrequenciesSubstitutionModel, bpp::CodonDistanceFrequenciesSubstitutionModel, bpp::CodonAdHocSubstitutionModel, bpp::CodonDistanceSubstitutionModel, and bpp::gBGC.

Definition at line 217 of file AbstractSubstitutionModel.h.

References bpp::AbstractParameterAliasable::fireParameterChanged(), bpp::AbstractParameterAliasable::getNamespace(), bpp::ParameterList::getParameterValue(), bpp::ParameterList::hasParameter(), bpp::AbstractTransitionModel::rate_, bpp::ParameterList::size(), and bpp::AbstractTransitionModel::updateMatrices_().

Referenced by bpp::gBGC::fireParameterChanged(), bpp::CodonDistanceSubstitutionModel::fireParameterChanged(), bpp::CodonAdHocSubstitutionModel::fireParameterChanged(), bpp::CodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::CodonDistancePhaseFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceFrequenciesSubstitutionModel::fireParameterChanged(), bpp::KroneckerCodonDistanceSubstitutionModel::fireParameterChanged(), bpp::SENCA::fireParameterChanged(), bpp::D1WalkSubstitutionModel::fireParameterChanged(), bpp::EquiprobableSubstitutionModel::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::LG08::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), and bpp::WAG01::fireParameterChanged().

◆ freq() [1/2]

◆ freq() [2/2]

virtual double bpp::AbstractTransitionModel::freq ( size_t  i) const
inlineoverridevirtualinherited
Returns
Equilibrium frequency associated to character i.
See also
getFrequencies(), getStates()

Implements bpp::TransitionModelInterface.

Definition at line 195 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::freq_.

Referenced by bpp::CodonSameAARateSubstitutionModel::compute_().

◆ frequencySet() [1/2]

◆ frequencySet() [2/2]

const FrequencySetInterface& bpp::AbstractTransitionModel::frequencySet ( ) const
inlineoverridevirtualinherited
Returns
Get the FrequencySet of equilibrium of this model.
Exceptions
Exceptionif no FrequenceSet is associated to this model.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::EquiprobableSubstitutionModel, bpp::D1WalkSubstitutionModel, and bpp::CodonDistanceFrequenciesSubstitutionModel.

Definition at line 207 of file AbstractSubstitutionModel.h.

◆ from()

int bpp::MixtureOfATransitionModel::from ( ) const
inlineinherited

Numbers of the states between which the substitution rates of all the submodels must be equal. If they are set to -1, this constraint does not exist among the submodels.

Definition at line 163 of file MixtureOfATransitionModel.h.

References bpp::MixtureOfATransitionModel::from_.

◆ getAlphabet() [1/2]

◆ getAlphabet() [2/2]

std::shared_ptr<const Alphabet> bpp::AbstractTransitionModel::getAlphabet ( ) const
inlineoverridevirtualinherited

◆ getAlphabetStateAsChar() [1/2]

virtual std::string bpp::BranchModelInterface::getAlphabetStateAsChar ( size_t  index) const
pure virtualinherited

◆ getAlphabetStateAsChar() [2/2]

std::string bpp::AbstractTransitionModel::getAlphabetStateAsChar ( size_t  index) const
inlineoverridevirtualinherited
Parameters
indexThe model state.
Returns
The corresponding alphabet state as character code.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 179 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

◆ getAlphabetStateAsInt() [1/2]

virtual int bpp::BranchModelInterface::getAlphabetStateAsInt ( size_t  index) const
pure virtualinherited

◆ getAlphabetStateAsInt() [2/2]

int bpp::AbstractTransitionModel::getAlphabetStateAsInt ( size_t  index) const
inlineoverridevirtualinherited
Parameters
indexThe model state.
Returns
The corresponding alphabet state as character code.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 181 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

Referenced by bpp::AbstractCodonSubstitutionModel::completeMatrices_(), and bpp::AbstractTransitionModel::getInitValue().

◆ getAlphabetStates() [1/2]

virtual const std::vector<int>& bpp::BranchModelInterface::getAlphabetStates ( ) const
pure virtualinherited

◆ getAlphabetStates() [2/2]

const std::vector<int>& bpp::AbstractTransitionModel::getAlphabetStates ( ) const
inlineoverridevirtualinherited
Returns
The alphabet states of each state of the model, as a vector of int codes.
See also
Alphabet

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 177 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

Referenced by bpp::DFP07::DFP07(), bpp::YNGP_M3::YNGP_M3(), and bpp::YNGP_M8::YNGP_M8().

◆ getd2Pij_dt2()

const Matrix< double > & AbstractMixedTransitionModel::getd2Pij_dt2 ( double  t) const
overridevirtualinherited
Returns
All second order derivatives of the probability of change from state i to state j with respect to time t, at time t.
See also
d2Pij_dt2()

Implements bpp::AbstractTransitionModel.

Definition at line 110 of file AbstractMixedTransitionModel.cpp.

References bpp::AbstractTransitionModel::d2pijt_, bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractMixedTransitionModel::modelsContainer_, and bpp::AbstractMixedTransitionModel::vProbas_.

◆ getdPij_dt()

const Matrix< double > & AbstractMixedTransitionModel::getdPij_dt ( double  t) const
overridevirtualinherited
Returns
Get all first order derivatives of the probability of change from state i to state j with respect to time t, at time t.
See also
dPij_dt()

Implements bpp::AbstractTransitionModel.

Definition at line 84 of file AbstractMixedTransitionModel.cpp.

References bpp::AbstractTransitionModel::dpijt_, bpp::AbstractTransitionModel::getNumberOfStates(), bpp::AbstractMixedTransitionModel::modelsContainer_, and bpp::AbstractMixedTransitionModel::vProbas_.

◆ getFrequencies() [1/2]

◆ getFrequencies() [2/2]

const Vdouble& bpp::AbstractTransitionModel::getFrequencies ( ) const
inlineoverridevirtualinherited
Returns
A vector of all equilibrium frequencies.
See also
freq()

Implements bpp::TransitionModelInterface.

Definition at line 187 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::freq_.

Referenced by bpp::SENCA::setFreq().

◆ getFrequencies_() [1/2]

◆ getFrequencies_() [2/2]

◆ getInitValue() [1/2]

virtual double bpp::BranchModelInterface::getInitValue ( size_t  i,
int  state 
) const
pure virtualinherited

This method is used to initialize likelihoods in recursions. It typically sends 1 if i = state, 0 otherwise, where i is one of the possible states of the alphabet allowed in the model and state is the observed state in the considered sequence/site.

Parameters
ithe index of the state in the model.
stateAn observed state in the sequence/site.
Returns
1 or 0 depending if the two states are compatible.
Exceptions
IndexOutOfBoundsExceptionif array position is out of range.
BadIntExceptionif states are not allowed in the associated alphabet.
See also
getStates();

Implemented in bpp::TransitionFromTransitionModel, bpp::RE08, bpp::OneChangeTransitionModel, bpp::OneChangeRegisterTransitionModel, bpp::MultinomialFromTransitionModel, bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedTransitionModel, and bpp::AbstractTransitionModel.

Referenced by bpp::AbstractTotallyWrappedTransitionModel::getInitValue(), bpp::InMixedSubstitutionModel::getInitValue(), bpp::MultinomialFromTransitionModel::getInitValue(), bpp::OneChangeRegisterTransitionModel::getInitValue(), bpp::OneChangeTransitionModel::getInitValue(), and bpp::TransitionFromTransitionModel::getInitValue().

◆ getInitValue() [2/2]

double AbstractTransitionModel::getInitValue ( size_t  i,
int  state 
) const
overridevirtualinherited

This method is used to initialize likelihoods in recursions. It typically sends 1 if i = state, 0 otherwise, where i is one of the possible states of the alphabet allowed in the model and state is the observed state in the considered sequence/site.

Parameters
ithe index of the state in the model.
stateAn observed state in the sequence/site.
Returns
1 or 0 depending if the two states are compatible.
Exceptions
IndexOutOfBoundsExceptionif array position is out of range.
BadIntExceptionif states are not allowed in the associated alphabet.
See also
getStates();

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RE08.

Definition at line 70 of file AbstractSubstitutionModel.cpp.

References bpp::AbstractTransitionModel::alphabet_, bpp::AbstractTransitionModel::getAlphabetStateAsInt(), and bpp::AbstractTransitionModel::size_.

◆ getModelStates() [1/4]

virtual std::vector<size_t> bpp::BranchModelInterface::getModelStates ( const std::string &  code) const
pure virtualinherited

Get the state in the model corresponding to a particular state in the alphabet.

Parameters
codeThe alphabet state to check.
Returns
A vector of indices of model states.

Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.

◆ getModelStates() [2/4]

std::vector<size_t> bpp::AbstractTransitionModel::getModelStates ( const std::string &  code) const
inlineoverridevirtualinherited

Get the state in the model corresponding to a particular state in the alphabet.

Parameters
codeThe alphabet state to check.
Returns
A vector of indices of model states.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 185 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

◆ getModelStates() [3/4]

virtual std::vector<size_t> bpp::BranchModelInterface::getModelStates ( int  code) const
pure virtualinherited

Get the state in the model corresponding to a particular state in the alphabet.

Parameters
codeThe alphabet state to check.
Returns
A vector of indices of model states.

Implemented in bpp::RegisterRatesSubstitutionModel, bpp::MarkovModulatedSubstitutionModel, bpp::AbstractWrappedModel, and bpp::AbstractTransitionModel.

Referenced by bpp::SubstitutionModelSet::getModelStates(), and bpp::AbstractWrappedModel::getModelStates().

◆ getModelStates() [4/4]

std::vector<size_t> bpp::AbstractTransitionModel::getModelStates ( int  code) const
inlineoverridevirtualinherited

Get the state in the model corresponding to a particular state in the alphabet.

Parameters
codeThe alphabet state to check.
Returns
A vector of indices of model states.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 183 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

◆ getName()

std::string bpp::MixtureOfATransitionModel::getName ( ) const
inlineoverridevirtualinherited

Get the name of the model.

Returns
The name of this model.

Implements bpp::BranchModelInterface.

Definition at line 93 of file MixtureOfATransitionModel.h.

◆ getNModel()

std::shared_ptr<const TransitionModelInterface> bpp::AbstractMixedTransitionModel::getNModel ( size_t  i) const
inlineoverridevirtualinherited

◆ getNProbability()

virtual double bpp::AbstractMixedTransitionModel::getNProbability ( size_t  i) const
inlineoverridevirtualinherited

Returns the probability of a specific model from the mixture.

Implements bpp::MixedTransitionModelInterface.

Definition at line 138 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::vProbas_.

◆ getNRate()

double bpp::AbstractMixedTransitionModel::getNRate ( size_t  i) const
inlineoverridevirtualinherited

Returns the rate of a specific model from the mixture.

Implements bpp::MixedTransitionModelInterface.

Definition at line 99 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::vRates_.

◆ getNumberOfModels()

virtual size_t bpp::AbstractMixedTransitionModel::getNumberOfModels ( ) const
inlineoverridevirtualinherited

◆ getNumberOfStates() [1/2]

◆ getNumberOfStates() [2/2]

size_t bpp::AbstractTransitionModel::getNumberOfStates ( ) const
inlineoverridevirtualinherited

Get the number of states.

For most models, this equals the size of the alphabet.

See also
getAlphabetChars for the list of supported states.
Returns
The number of different states in the model.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel, bpp::RE08Codon, bpp::RE08Protein, bpp::RE08Nucleotide, bpp::YpR, bpp::gBGC, bpp::DFPDistanceFrequenciesSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, and bpp::BinarySubstitutionModel.

Definition at line 175 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

Referenced by bpp::AbstractCodonSubstitutionModel::completeMatrices_(), bpp::AbstractKroneckerCodonSubstitutionModel::completeMatrices_(), bpp::AbstractKroneckerWordSubstitutionModel::fillBasicGenerator_(), bpp::AbstractWordSubstitutionModel::fillBasicGenerator_(), bpp::WordSubstitutionModel::getd2Pij_dt2(), bpp::AbstractMixedTransitionModel::getd2Pij_dt2(), bpp::WordSubstitutionModel::getdPij_dt(), bpp::AbstractMixedTransitionModel::getdPij_dt(), bpp::RE08Nucleotide::getNumberOfStates(), bpp::RE08Protein::getNumberOfStates(), bpp::RE08Codon::getNumberOfStates(), bpp::WordSubstitutionModel::getPij_t(), bpp::AbstractMixedTransitionModel::getPij_t(), bpp::AbstractWordSubstitutionModel::setFreq(), bpp::AbstractSubstitutionModel::updateMatrices_(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::MixtureOfATransitionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().

◆ getPij_t()

const Matrix< double > & AbstractMixedTransitionModel::getPij_t ( double  t) const
overridevirtualinherited

◆ getProbabilities()

virtual const std::vector<double>& bpp::AbstractMixedTransitionModel::getProbabilities ( ) const
inlineoverridevirtualinherited

Returns the vector of probabilities.

Implements bpp::MixedTransitionModelInterface.

Definition at line 147 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::vProbas_.

◆ getRate() [1/2]

◆ getRate() [2/2]

double AbstractTransitionModel::getRate ( ) const
overridevirtualinherited

The rate of the substitution process.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 45 of file AbstractSubstitutionModel.cpp.

References bpp::AbstractTransitionModel::rate_.

◆ getStateMap() [1/2]

virtual std::shared_ptr<const StateMapInterface> bpp::BranchModelInterface::getStateMap ( ) const
pure virtualinherited

◆ getStateMap() [2/2]

std::shared_ptr<const StateMapInterface> bpp::AbstractTransitionModel::getStateMap ( ) const
inlineoverridevirtualinherited
Returns
A shared_ptr to the mapping of model states with alphabet states.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 173 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

Referenced by bpp::D1WalkSubstitutionModel::D1WalkSubstitutionModel(), and bpp::EquiprobableSubstitutionModel::EquiprobableSubstitutionModel().

◆ getSubmodelNumbers()

Vuint MixtureOfATransitionModel::getSubmodelNumbers ( const std::string &  desc) const
overridevirtualinherited

Returns the vector of numbers of the submodels in the mixture that match a description of the parameters numbers.

Parameters
descis the description of the class indexes of the mixed parameters. Syntax is like: kappa_1,gamma_3,delta_2

Implements bpp::MixedTransitionModelInterface.

Definition at line 216 of file MixtureOfATransitionModel.cpp.

References bpp::MixtureOfATransitionModel::distributionMap_, bpp::StringTokenizer::hasMoreToken(), bpp::AbstractMixedTransitionModel::modelsContainer_, and bpp::StringTokenizer::nextToken().

◆ getVRates()

const std::vector<double>& bpp::AbstractMixedTransitionModel::getVRates ( ) const
inlineoverridevirtualinherited

Returns the vector of all the rates of the mixture.

Implements bpp::MixedTransitionModelInterface.

Definition at line 129 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::vRates_.

◆ hasDistribution()

bool bpp::MixtureOfATransitionModel::hasDistribution ( std::string &  parName) const
inlineinherited

Tells whether a DiscreteDistribution is associated with a given parameter name.

Parameters
parNamename of the parameter

Definition at line 138 of file MixtureOfATransitionModel.h.

References bpp::MixtureOfATransitionModel::distributionMap_.

◆ Lik_t() [1/2]

virtual const Eigen::VectorXd& bpp::TransitionModelInterface::Lik_t ( const Eigen::VectorXd &  values,
double  t 
) const
pure virtualinherited

This method is used to compute likelihoods in recursions. It computes the probability of a vector given a start state.

Parameters
valuesAn vector of states on the site.
tthe branch length

Implements bpp::BranchModelInterface.

Implemented in bpp::AbstractLkTransitionModel.

◆ Lik_t() [2/2]

const Eigen::VectorXd& bpp::AbstractLkTransitionModel::Lik_t ( const Eigen::VectorXd &  values,
double  t 
) const
inlineoverridevirtualinherited

This method is used to compute likelihoods in recursions. It computes the probability of a vector given a start state.

Parameters
valuesAn vector of states on the site.
tthe branch length

Implements bpp::TransitionModelInterface.

Definition at line 30 of file AbstractSubstitutionModel.h.

References bpp::TransitionModelInterface::getPij_t(), and bpp::AbstractLkTransitionModel::lik_.

◆ model() [1/2]

const TransitionModelInterface& bpp::MixtureOfATransitionModel::model ( const std::string &  name) const
inlineoverridevirtualinherited

◆ model() [2/2]

const TransitionModelInterface& bpp::MixtureOfATransitionModel::model ( size_t  i) const
inlineinherited

◆ nModel()

const TransitionModelInterface& bpp::AbstractMixedTransitionModel::nModel ( size_t  i) const
inlineoverridevirtualinherited

◆ nModel_()

TransitionModelInterface& bpp::AbstractMixedTransitionModel::nModel_ ( size_t  i)
inlineoverrideprotectedvirtualinherited

◆ normalizeVRates()

void AbstractMixedTransitionModel::normalizeVRates ( )
overridevirtualinherited

◆ operator=()

MixtureOfASubstitutionModel& bpp::MixtureOfASubstitutionModel::operator= ( const MixtureOfASubstitutionModel model)
inline

◆ Pij_t() [1/2]

◆ Pij_t() [2/2]

virtual double bpp::AbstractTransitionModel::Pij_t ( size_t  i,
size_t  j,
double  t 
) const
inlineoverridevirtualinherited
Returns
The probability of change from state i to state j during time t.
See also
getPij_t(), getStates()

Implements bpp::TransitionModelInterface.

Reimplemented in bpp::RE08, bpp::JCprot, bpp::TN93, bpp::T92, bpp::K80, bpp::JCnuc, bpp::F81, bpp::EquiprobableSubstitutionModel, bpp::TwoParameterBinarySubstitutionModel, bpp::HKY85, bpp::F84, and bpp::BinarySubstitutionModel.

Definition at line 197 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::getPij_t().

Referenced by bpp::JCprot::Pij_t().

◆ setFreq()

void MixtureOfATransitionModel::setFreq ( std::map< int, double > &  m)
overridevirtualinherited

sets the eq frequencies of the first nested model, and adapts the parameters at best to it (surely there is a better way to manage this).

Reimplemented from bpp::AbstractMixedTransitionModel.

Definition at line 210 of file MixtureOfATransitionModel.cpp.

References bpp::AbstractParameterAliasable::getParameters(), bpp::AbstractParameterAliasable::matchParametersValues(), and bpp::AbstractMixedTransitionModel::modelsContainer_.

◆ setFreqFromData()

void bpp::AbstractMixedTransitionModel::setFreqFromData ( const SequenceDataInterface data,
double  pseudoCount 
)
inlineoverridevirtualinherited

Set equilibrium frequencies equal to the frequencies estimated from the data.

Parameters
dataThe sequences to use.
pseudoCountA quantity $\psi$ to add to adjust the observed values in order to prevent issues due to missing states on small data set. The corrected frequencies shall be computed as

\[ \pi_i = \frac{n_i+\psi}{\sum_j (f_j+\psi)} \]

Implements bpp::TransitionModelInterface.

Definition at line 200 of file AbstractMixedTransitionModel.h.

References bpp::SequenceContainerTools::getFrequencies(), and bpp::AbstractMixedTransitionModel::setFreq().

◆ setNProbability()

virtual void bpp::AbstractMixedTransitionModel::setNProbability ( size_t  i,
double  prob 
)
inlineoverridevirtualinherited

Sets the probability of a specific model from the mixture.

Implements bpp::MixedTransitionModelInterface.

Definition at line 155 of file AbstractMixedTransitionModel.h.

References bpp::AbstractMixedTransitionModel::vProbas_.

◆ setRate()

void AbstractMixedTransitionModel::setRate ( double  rate)
overridevirtualinherited

◆ setVerboseLevel()

void bpp::AbstractTransitionModel::setVerboseLevel ( short  level)
inlineinherited

◆ setVRates()

void AbstractMixedTransitionModel::setVRates ( const Vdouble vd)
overridevirtualinherited

Sets the rates of the submodels to be proportional to a given vector, with the constraint that the mean rate of the mixture equals rate_.

Parameters
vda vector of positive values such that the rates of the respective submodels are in the same proportions (ie this vector does not need to be normalized).

Implements bpp::MixedTransitionModelInterface.

Reimplemented in bpp::MixtureOfTransitionModels.

Definition at line 156 of file AbstractMixedTransitionModel.cpp.

References bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractMixedTransitionModel::normalizeVRates(), and bpp::AbstractMixedTransitionModel::vRates_.

Referenced by bpp::MixtureOfTransitionModels::setVRates(), and updateMatrices_().

◆ stateMap() [1/2]

virtual const StateMapInterface& bpp::BranchModelInterface::stateMap ( ) const
pure virtualinherited

◆ stateMap() [2/2]

const StateMapInterface& bpp::AbstractTransitionModel::stateMap ( ) const
inlineoverridevirtualinherited
Returns
The mapping of model states with alphabet states.

Implements bpp::BranchModelInterface.

Reimplemented in bpp::RegisterRatesSubstitutionModel.

Definition at line 171 of file AbstractSubstitutionModel.h.

References bpp::AbstractTransitionModel::stateMap_.

◆ subModel()

const SubstitutionModelInterface& bpp::MixtureOfASubstitutionModel::subModel ( const std::string &  name) const
inline

retrieve a pointer to the substitution model with the given name.

Definition at line 83 of file MixtureOfASubstitutionModel.h.

References bpp::MixtureOfATransitionModel::model().

◆ subNModel()

◆ to()

int bpp::MixtureOfATransitionModel::to ( ) const
inlineinherited

Definition at line 165 of file MixtureOfATransitionModel.h.

References bpp::MixtureOfATransitionModel::to_.

◆ updateMatrices_()

void bpp::MixtureOfASubstitutionModel::updateMatrices_ ( )
inlineoverrideprotectedvirtual

Diagonalize the $Q$ matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVectors_ matrices.

The generator_ matrix and freq_ vector must be initialized.

Eigen values and vectors are computed from the generator and assigned to the eigenValues_ for the real part, iEigenValues_ for the imaginary part, rightEigenVectors_ and leftEigenVectors_ variables. isDiagonalizable_ checks if the generator_ is diagonalizable in R.

The optional rate parameter is not taken into account in this method to prevent unnecessary computation.

!! Here there is no normalization of the generator.

Implements bpp::AbstractTransitionModel.

Definition at line 63 of file MixtureOfASubstitutionModel.h.

References bpp::MixtureOfATransitionModel::from_, bpp::AbstractMixedTransitionModel::modelsContainer_, bpp::AbstractMixedTransitionModel::setVRates(), subNModel(), bpp::MixtureOfATransitionModel::to_, and bpp::MixtureOfATransitionModel::updateMatrices_().

◆ verboseLevel()

short bpp::AbstractTransitionModel::verboseLevel ( ) const
inlineinherited

Member Data Documentation

◆ alphabet_

◆ d2pijt_

RowMatrix<double> bpp::AbstractTransitionModel::d2pijt_
mutableprotectedinherited

◆ distributionMap_

◆ dpijt_

RowMatrix<double> bpp::AbstractTransitionModel::dpijt_
mutableprotectedinherited

◆ freq_

Vdouble bpp::AbstractTransitionModel::freq_
protectedinherited

The vector $\pi_e$ of equilibrium frequencies.

Definition at line 143 of file AbstractSubstitutionModel.h.

Referenced by bpp::AbstractReversibleSubstitutionModel::AbstractReversibleSubstitutionModel(), bpp::AbstractTransitionModel::AbstractTransitionModel(), bpp::WordSubstitutionModel::completeMatrices_(), bpp::Coala::computeEquilibriumFrequencies(), bpp::RE08::d2Pij_dt2(), bpp::RE08::dPij_dt(), bpp::DSO78::DSO78(), bpp::EquiprobableSubstitutionModel::EquiprobableSubstitutionModel(), bpp::EquiprobableSubstitutionModel::fireParameterChanged(), bpp::DSO78::fireParameterChanged(), bpp::JCprot::fireParameterChanged(), bpp::JTT92::fireParameterChanged(), bpp::LG08::fireParameterChanged(), bpp::UserProteinSubstitutionModel::fireParameterChanged(), bpp::WAG01::fireParameterChanged(), bpp::AbstractTransitionModel::freq(), bpp::RE08::getd2Pij_dt2(), bpp::RE08::getdPij_dt(), bpp::AbstractTransitionModel::getFrequencies(), bpp::AbstractTransitionModel::getFrequencies_(), bpp::RE08::getPij_t(), bpp::AbstractSubstitutionModel::getScale(), bpp::JCprot::JCprot(), bpp::JTT92::JTT92(), bpp::LG08::LG08(), bpp::RE08::Pij_t(), bpp::RE08::RE08(), bpp::UserProteinSubstitutionModel::readFromFile(), bpp::D1WalkSubstitutionModel::setFreq(), bpp::EquiprobableSubstitutionModel::setFreq(), bpp::AbstractTransitionModel::setFreq(), bpp::DSO78::setFreqFromData(), bpp::JCprot::setFreqFromData(), bpp::JTT92::setFreqFromData(), bpp::LG08::setFreqFromData(), bpp::UserProteinSubstitutionModel::setFreqFromData(), bpp::WAG01::setFreqFromData(), bpp::AbstractSubstitutionModel::updateMatrices_(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::BinarySubstitutionModel::updateMatrices_(), bpp::F84::updateMatrices_(), bpp::HKY85::updateMatrices_(), bpp::TwoParameterBinarySubstitutionModel::updateMatrices_(), bpp::AbstractReversibleSubstitutionModel::updateMatrices_(), bpp::D1WalkSubstitutionModel::updateMatrices_(), bpp::EquiprobableSubstitutionModel::updateMatrices_(), bpp::MixtureOfATransitionModel::updateMatrices_(), bpp::MixtureOfTransitionModels::updateMatrices_(), bpp::F81::updateMatrices_(), bpp::gBGC::updateMatrices_(), bpp::GTR::updateMatrices_(), bpp::JCnuc::updateMatrices_(), bpp::K80::updateMatrices_(), bpp::L95::updateMatrices_(), bpp::RN95::updateMatrices_(), bpp::RN95s::updateMatrices_(), bpp::SSR::updateMatrices_(), bpp::T92::updateMatrices_(), bpp::TN93::updateMatrices_(), bpp::POMO::updateMatrices_(), bpp::JCprot::updateMatrices_(), bpp::RE08::updateMatrices_(), bpp::YpR::updateMatrices_(), bpp::UserProteinSubstitutionModel::UserProteinSubstitutionModel(), and bpp::WAG01::WAG01().

◆ from_

◆ lik_

Eigen::VectorXd bpp::AbstractLkTransitionModel::lik_
mutableprivateinherited

◆ modelsContainer_

std::vector< std::shared_ptr<TransitionModelInterface> > bpp::AbstractMixedTransitionModel::modelsContainer_
protectedinherited

◆ pijt_

RowMatrix<double> bpp::AbstractTransitionModel::pijt_
mutableprotectedinherited

◆ rate_

double bpp::AbstractTransitionModel::rate_
protectedinherited

The rate of the model (default: 1). The generator (and all its vectorial components) is independent of the rate, since it should be normalized.

Definition at line 138 of file AbstractSubstitutionModel.h.

Referenced by bpp::AbstractTransitionModel::addRateParameter(), bpp::BinarySubstitutionModel::d2Pij_dt2(), bpp::F84::d2Pij_dt2(), bpp::HKY85::d2Pij_dt2(), bpp::TwoParameterBinarySubstitutionModel::d2Pij_dt2(), bpp::EquiprobableSubstitutionModel::d2Pij_dt2(), bpp::F81::d2Pij_dt2(), bpp::JCnuc::d2Pij_dt2(), bpp::K80::d2Pij_dt2(), bpp::T92::d2Pij_dt2(), bpp::TN93::d2Pij_dt2(), bpp::JCprot::d2Pij_dt2(), bpp::BinarySubstitutionModel::dPij_dt(), bpp::F84::dPij_dt(), bpp::HKY85::dPij_dt(), bpp::TwoParameterBinarySubstitutionModel::dPij_dt(), bpp::EquiprobableSubstitutionModel::dPij_dt(), bpp::F81::dPij_dt(), bpp::JCnuc::dPij_dt(), bpp::K80::dPij_dt(), bpp::T92::dPij_dt(), bpp::TN93::dPij_dt(), bpp::JCprot::dPij_dt(), bpp::AbstractTransitionModel::fireParameterChanged(), bpp::BinarySubstitutionModel::getd2Pij_dt2(), bpp::F84::getd2Pij_dt2(), bpp::HKY85::getd2Pij_dt2(), bpp::TwoParameterBinarySubstitutionModel::getd2Pij_dt2(), bpp::EquiprobableSubstitutionModel::getd2Pij_dt2(), bpp::F81::getd2Pij_dt2(), bpp::JCnuc::getd2Pij_dt2(), bpp::K80::getd2Pij_dt2(), bpp::T92::getd2Pij_dt2(), bpp::TN93::getd2Pij_dt2(), bpp::JCprot::getd2Pij_dt2(), bpp::WordSubstitutionModel::getd2Pij_dt2(), bpp::AbstractSubstitutionModel::getd2Pij_dt2(), bpp::BinarySubstitutionModel::getdPij_dt(), bpp::F84::getdPij_dt(), bpp::HKY85::getdPij_dt(), bpp::TwoParameterBinarySubstitutionModel::getdPij_dt(), bpp::EquiprobableSubstitutionModel::getdPij_dt(), bpp::F81::getdPij_dt(), bpp::JCnuc::getdPij_dt(), bpp::K80::getdPij_dt(), bpp::T92::getdPij_dt(), bpp::TN93::getdPij_dt(), bpp::JCprot::getdPij_dt(), bpp::WordSubstitutionModel::getdPij_dt(), bpp::AbstractSubstitutionModel::getdPij_dt(), bpp::BinarySubstitutionModel::getPij_t(), bpp::F84::getPij_t(), bpp::HKY85::getPij_t(), bpp::TwoParameterBinarySubstitutionModel::getPij_t(), bpp::EquiprobableSubstitutionModel::getPij_t(), bpp::F81::getPij_t(), bpp::JCnuc::getPij_t(), bpp::K80::getPij_t(), bpp::T92::getPij_t(), bpp::TN93::getPij_t(), bpp::JCprot::getPij_t(), bpp::WordSubstitutionModel::getPij_t(), bpp::AbstractSubstitutionModel::getPij_t(), bpp::AbstractTransitionModel::getRate(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::BinarySubstitutionModel::Pij_t(), bpp::F84::Pij_t(), bpp::HKY85::Pij_t(), bpp::TwoParameterBinarySubstitutionModel::Pij_t(), bpp::EquiprobableSubstitutionModel::Pij_t(), bpp::F81::Pij_t(), bpp::JCnuc::Pij_t(), bpp::K80::Pij_t(), bpp::T92::Pij_t(), bpp::TN93::Pij_t(), bpp::JCprot::Pij_t(), bpp::AbstractMixedTransitionModel::setRate(), bpp::AbstractTransitionModel::setRate(), bpp::BinarySubstitutionModel::updateMatrices_(), bpp::TwoParameterBinarySubstitutionModel::updateMatrices_(), and bpp::MixtureOfTransitionModels::updateMatrices_().

◆ size_

◆ stateMap_

◆ to_

◆ verboseLevel_

short bpp::AbstractTransitionModel::verboseLevel_
protectedinherited

◆ vProbas_

◆ vRates_

std::vector<double> bpp::AbstractMixedTransitionModel::vRates_
protectedinherited

vector of the rates of the models.

For the computation of the transition probabilities, the rates are included in the submodels while updating the mixture, so there is no need to multiply here the transition times with the rates.

The mean (on the distribution of the models) of the elements of this vector equals the overall rate of the mixture model, that is rate_;

Definition at line 60 of file AbstractMixedTransitionModel.h.

Referenced by bpp::AbstractMixedTransitionModel::AbstractMixedTransitionModel(), bpp::AbstractMixedTransitionModel::getNRate(), bpp::AbstractMixedTransitionModel::getVRates(), bpp::MixtureOfATransitionModel::MixtureOfATransitionModel(), bpp::MixtureOfTransitionModels::MixtureOfTransitionModels(), bpp::AbstractMixedTransitionModel::normalizeVRates(), bpp::AbstractMixedTransitionModel::operator=(), bpp::AbstractMixedTransitionModel::setRate(), bpp::AbstractMixedTransitionModel::setVRates(), bpp::MixtureOfTransitionModels::setVRates(), and bpp::MixtureOfTransitionModels::updateMatrices_().


The documentation for this class was generated from the following file: