bpp-phyl3  3.0.0
bpp::RegisterRatesSubstitutionModel Class Referenceabstract

From a model, substitution rates are set into categories following a given register. Each substitution of a category is then multiplied by a rate parameter specific to this category. More...

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

+ Inheritance diagram for bpp::RegisterRatesSubstitutionModel:
+ Collaboration diagram for bpp::RegisterRatesSubstitutionModel:

Public Member Functions

 RegisterRatesSubstitutionModel (std::unique_ptr< SubstitutionModelInterface > originalModel, const SubstitutionRegisterInterface &reg, bool isNormalized=false)
 Constructor. More...
 
 RegisterRatesSubstitutionModel (const RegisterRatesSubstitutionModel &fmsm)
 
RegisterRatesSubstitutionModeloperator= (const RegisterRatesSubstitutionModel &fmsm)
 
virtual ~RegisterRatesSubstitutionModel ()
 
RegisterRatesSubstitutionModelclone () const override
 
const SubstitutionModelInterfacesubstitutionModel () const override
 From AbstractWrappedSubstitutionModel. More...
 
const TransitionModelInterfacetransitionModel () const override
 
void fireParameterChanged (const ParameterList &parameters) override
 Tells the model that a parameter value has changed. More...
 
size_t getNumberOfStates () const override
 Get the number of states. More...
 
std::string getName () const override
 Get the name of the model. More...
 
const std::string & getRegisterName () const
 
void addRateParameter () override
 add a "rate" parameter to the model, that handles the overall rate of the process. More...
 
void setRate (double rate) override
 Set the rate of the model (must be positive). More...
 
double getRate () const override
 The rate of the substitution process. More...
 
const BranchModelInterfacemodel () const override
 
void setNamespace (const std::string &prefix)
 
bool hasIndependentParameter (const std::string &name) const
 
const ParameterListgetIndependentParameters () const
 
size_t getNumberOfIndependentParameters () const
 
void aliasParameters (const std::string &p1, const std::string &p2)
 
void aliasParameters (std::map< std::string, std::string > &unparsedParams, bool verbose)
 
void unaliasParameters (const std::string &p1, const std::string &p2)
 
ParameterList getAliasedParameters (const ParameterList &pl) const
 
ParameterList getFromParameters (const ParameterList &pl) const
 
virtual std::vector< std::string > getAlias (const std::string &name) const
 
virtual std::map< std::string, std::string > getAliases () const
 
std::string getFrom (const std::string &name) const
 
bool hasParameter (const std::string &name) const override
 
const ParameterListgetParameters () const override
 
const Parameterparameter (const std::string &name) const override
 
const std::shared_ptr< Parameter > & getParameter (const std::string &name) const
 
double getParameterValue (const std::string &name) const override
 
void setAllParametersValues (const ParameterList &parameters) override
 
void setParameterValue (const std::string &name, double value) override
 
void setParametersValues (const ParameterList &parameters) override
 
bool matchParametersValues (const ParameterList &parameters) override
 
void removeConstraint (const std::string &name) override
 
void setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
 
size_t getNumberOfParameters () const override
 
std::string getNamespace () const override
 
std::string getParameterNameWithoutNamespace (const std::string &name) const override
 
virtual double getInitValue (size_t i, int state) const =0
 
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 double freq (size_t i) const =0
 
virtual double Pij_t (size_t i, size_t j, double t) const =0
 
virtual double dPij_dt (size_t i, size_t j, double t) const =0
 
virtual double d2Pij_dt2 (size_t i, size_t j, double t) const =0
 
virtual const VdoublegetFrequencies () const =0
 
virtual bool computeFrequencies () const =0
 
virtual void computeFrequencies (bool yn)=0
 
virtual const Matrix< double > & getPij_t (double t) const =0
 
virtual const Matrix< double > & getdPij_dt (double t) const =0
 
virtual const Matrix< double > & getd2Pij_dt2 (double t) const =0
 
virtual void setFreqFromData (const SequenceDataInterface &data, double pseudoCount=0)=0
 Set equilibrium frequencies equal to the frequencies estimated from the data. More...
 
virtual void setFreq (std::map< int, double > &frequencies)=0
 Set equilibrium frequencies. More...
 
virtual double Qij (size_t i, size_t j) const =0
 A method for computing all necessary matrices. More...
 
virtual const Matrix< double > & generator () const =0
 
virtual const Matrix< double > & exchangeabilityMatrix () const =0
 
virtual double Sij (size_t i, size_t j) const =0
 
virtual void enableEigenDecomposition (bool yn)=0
 Set if eigenValues and Vectors must be computed. More...
 
virtual bool enableEigenDecomposition ()=0
 Tell if eigenValues and Vectors must be computed. More...
 
virtual const VdoublegetEigenValues () const =0
 
virtual const VdoublegetIEigenValues () const =0
 
virtual bool isDiagonalizable () const =0
 
virtual bool isNonSingular () const =0
 
virtual const Matrix< double > & getRowLeftEigenVectors () const =0
 
virtual const Matrix< double > & getColumnRightEigenVectors () const =0
 
virtual void setScalable (bool scalable)=0
 sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example. More...
 
virtual bool isScalable () const =0
 returns if model is scalable More...
 
virtual double getScale () const =0
 Get the scalar product of diagonal elements of the generator and the frequencies vector. If the generator is normalized, then scale=1. Otherwise each element must be multiplied by 1/scale. More...
 
virtual void setScale (double scale)=0
 Multiplies the current generator by the given scale. More...
 
virtual void normalize ()=0
 Normalize the generator. More...
 
virtual void setDiagonal ()=0
 set the diagonal of the generator such that sum on each line equals 0. More...
 
bool computeFrequencies () const
 
void computeFrequencies (bool yn)
 
const Matrix< double > & generator () const
 
const Matrix< double > & exchangeabilityMatrix () const
 
const Matrix< double > & getPij_t (double t) const
 
const Matrix< double > & getdPij_dt (double t) const
 
const Matrix< double > & getd2Pij_dt2 (double t) const
 
double Sij (size_t i, size_t j) const
 
const VdoublegetEigenValues () const
 
const VdoublegetIEigenValues () const
 
bool isDiagonalizable () const
 
bool isNonSingular () const
 
const Matrix< double > & getRowLeftEigenVectors () const
 
const Matrix< double > & getColumnRightEigenVectors () const
 
virtual double Qij (size_t i, size_t j) const
 A method for computing all necessary matrices. More...
 
void enableEigenDecomposition (bool yn)
 Set if eigenValues and Vectors must be computed. More...
 
bool enableEigenDecomposition ()
 Tell if eigenValues and Vectors must be computed. More...
 
void setScalable (bool scalable)
 sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example. More...
 
virtual bool isScalable () const
 returns if model is scalable More...
 
double getScale () const
 return scale More...
 
void setScale (double scale)
 Multiplies the current generator by the given scale. More...
 
void normalize ()
 normalize the generator More...
 
void setDiagonal ()
 set the diagonal of the generator such that sum on each line equals 0. More...
 
const VdoublegetFrequencies () const override
 
virtual double freq (size_t i) const override
 
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 override
 
virtual double d2Pij_dt2 (size_t i, size_t j, double t) const override
 
double getInitValue (size_t i, int state) const override
 
void setFreqFromData (const SequenceDataInterface &data, double pseudoCount=0) override
 Set equilibrium frequencies equal to the frequencies estimated from the data. More...
 
virtual void setFreq (std::map< int, double > &freqs) override
 Set equilibrium frequencies. More...
 
void setVerboseLevel (short level)
 
short verboseLevel () const
 
const std::vector< int > & getAlphabetStates () const override
 Overrides of AbstractSubstitutionModel and AbstractWrappedSubstitutionModel. More...
 
std::vector< size_t > getModelStates (int i) 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 &s) const override
 Get the state in the model corresponding to a particular state in the alphabet. More...
 
int getAlphabetStateAsInt (size_t i) const override
 
std::string getAlphabetStateAsChar (size_t s) const override
 
const Alphabetalphabet () const override
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
const StateMapInterfacestateMap () const override
 
std::shared_ptr< const StateMapInterfacegetStateMap () const override
 
const FrequencySetInterfacefrequencySet () const override
 

Protected Member Functions

SubstitutionModelInterfacesubstitutionModel_ () override
 
TransitionModelInterfacetransitionModel_ () override
 
void updateMatrices_ () override
 Diagonalize the $Q$ matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVectors_ matrices. More...
 
BranchModelInterfacemodel_ ()
 
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
 
ParameterListgetParameters_ () override
 
virtual VdoublegetFrequencies_ ()=0
 
VdoublegetFrequencies_ () override
 

Protected Attributes

bool isScalable_
 If the model is scalable (ie generator can be normalized automatically). More...
 
RowMatrix< double > generator_
 The generator matrix $Q$ of the model. More...
 
bool computeFreq_
 if the Frequencies must be computed from the generator More...
 
RowMatrix< double > exchangeability_
 The exchangeability matrix $S$ of the model, defined as $ S_{ij}=\frac{Q_{ij}}{\pi_j}$. When the model is reversible, this matrix is symmetric. More...
 
bool eigenDecompose_
 Tell if the eigen decomposition should be performed. More...
 
Vdouble eigenValues_
 The vector of eigen values. More...
 
Vdouble iEigenValues_
 The vector of the imaginary part of the eigen values. More...
 
bool isDiagonalizable_
 boolean value for diagonalizability in R of the generator_ More...
 
RowMatrix< double > rightEigenVectors_
 The $U^-1$ matrix made of right eigen vectors (by column). More...
 
bool isNonSingular_
 boolean value for non-singularity of rightEigenVectors_ More...
 
RowMatrix< double > leftEigenVectors_
 The $U$ matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular. More...
 
std::vector< RowMatrix< double > > vPowGen_
 vector of the powers of generator_ for Taylor development (if rightEigenVectors_ is singular). More...
 
RowMatrix< double > tmpMat_
 For computational issues. 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 Member Functions

void setRegStates_ ()
 

Private Attributes

std::unique_ptr< SubstitutionModelInterfaceoriginalModel_
 The related model. More...
 
std::string registerName_
 
VVVuint vRegStates_
 Vector of register state -> vector of from states -> vector of to states (for acceleration purpose) More...
 
size_t nbTypes_
 
Vdouble vRates_
 vector of the rates of the register types More...
 
ParameterList independentParameters_
 
std::map< std::string, std::shared_ptr< AliasParameterListener > > aliasListenersRegister_
 
ParameterList parameters_
 
std::string prefix_
 
Eigen::VectorXd lik_
 

Detailed Description

From a model, substitution rates are set into categories following a given register. Each substitution of a category is then multiplied by a rate parameter specific to this category.

It has the same parameters as the SubModel.

See also
SubstitutionRegister

Definition at line 26 of file RegisterRatesSubstitutionModel.h.

Constructor & Destructor Documentation

◆ RegisterRatesSubstitutionModel() [1/2]

RegisterRatesSubstitutionModel::RegisterRatesSubstitutionModel ( std::unique_ptr< SubstitutionModelInterface originalModel,
const SubstitutionRegisterInterface reg,
bool  isNormalized = false 
)

◆ RegisterRatesSubstitutionModel() [2/2]

bpp::RegisterRatesSubstitutionModel::RegisterRatesSubstitutionModel ( const RegisterRatesSubstitutionModel fmsm)
inline

Definition at line 68 of file RegisterRatesSubstitutionModel.h.

◆ ~RegisterRatesSubstitutionModel()

virtual bpp::RegisterRatesSubstitutionModel::~RegisterRatesSubstitutionModel ( )
inlinevirtual

Definition at line 96 of file RegisterRatesSubstitutionModel.h.

Member Function Documentation

◆ addRateParameter()

void bpp::RegisterRatesSubstitutionModel::addRateParameter ( )
inlineoverridevirtual

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 153 of file RegisterRatesSubstitutionModel.h.

◆ alphabet()

const Alphabet& bpp::RegisterRatesSubstitutionModel::alphabet ( ) const
inlineoverridevirtual
Returns
A reference to the alphabet associated to this model.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 189 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::alphabet().

◆ clone()

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

◆ computeFrequencies() [1/4]

◆ computeFrequencies() [2/4]

◆ computeFrequencies() [3/4]

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

Implements bpp::TransitionModelInterface.

Definition at line 406 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::computeFreq_.

◆ computeFrequencies() [4/4]

virtual void bpp::TransitionModelInterface::computeFrequencies ( bool  yn)
pure virtualinherited

◆ d2Lik_dt2() [1/2]

virtual const Eigen::VectorXd& bpp::BranchModelInterface::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().

◆ dLik_dt() [1/2]

virtual const Eigen::VectorXd& bpp::BranchModelInterface::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().

◆ enableEigenDecomposition() [1/4]

◆ enableEigenDecomposition() [2/4]

virtual bool bpp::SubstitutionModelInterface::enableEigenDecomposition ( )
pure virtualinherited

◆ enableEigenDecomposition() [3/4]

void bpp::AbstractSubstitutionModel::enableEigenDecomposition ( bool  yn)
inlinevirtualinherited

Set if eigenValues and Vectors must be computed.

Implements bpp::SubstitutionModelInterface.

Definition at line 432 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::eigenDecompose_.

◆ enableEigenDecomposition() [4/4]

virtual void bpp::SubstitutionModelInterface::enableEigenDecomposition ( bool  yn)
pure virtualinherited

◆ exchangeabilityMatrix() [1/2]

const Matrix<double>& bpp::AbstractSubstitutionModel::exchangeabilityMatrix ( ) const
inlinevirtualinherited
Returns
The matrix of exchangeability terms. It is recommended that exchangeability matrix be normalized so that the normalized generator be obtained directly by the dot product $S . \pi$.

Implements bpp::SubstitutionModelInterface.

Definition at line 410 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::exchangeability_.

◆ exchangeabilityMatrix() [2/2]

virtual const Matrix<double>& bpp::SubstitutionModelInterface::exchangeabilityMatrix ( ) const
pure virtualinherited
Returns
The matrix of exchangeability terms. It is recommended that exchangeability matrix be normalized so that the normalized generator be obtained directly by the dot product $S . \pi$.

Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedSubstitutionModel, and bpp::AbstractSubstitutionModel.

Referenced by bpp::Coala::Coala(), bpp::AbstractTotallyWrappedSubstitutionModel::exchangeabilityMatrix(), and bpp::InMixedSubstitutionModel::exchangeabilityMatrix().

◆ fireParameterChanged()

void bpp::RegisterRatesSubstitutionModel::fireParameterChanged ( const ParameterList parameters)
inlineoverridevirtual

Tells the model that a parameter value has changed.

This updates the matrices consequently.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 130 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractParameterAliasable::fireParameterChanged(), bpp::ParameterAliasable::matchParametersValues(), substitutionModel_(), and updateMatrices_().

◆ 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()

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 209 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedTransitionModel::frequencySet().

◆ generator() [1/2]

const Matrix<double>& bpp::AbstractSubstitutionModel::generator ( ) const
inlinevirtualinherited
Returns
The normalized Markov generator matrix, i.e. all normalized rates of changes from state i to state j. The generator is normalized so that (i) $ \forall i; \sum_j Q_{i,j} = 0 $, meaning that $ $ \forall i; Q_{i,i} = -\sum_{j \neq i}Q_{i,j}$, and (ii) $ \sum_i Q_{i,i} \times \pi_i = -1$. This means that, under normalization, the mean rate of replacement at equilibrium is 1 and that time $t$ are measured in units of expected number of changes per site. Additionally, the rate_ attribute provides the possibility to increase or decrease this mean rate.

See Kosiol and Goldman (2005), Molecular Biology And Evolution 22(2) 193-9.

See also
Qij()

Implements bpp::SubstitutionModelInterface.

Definition at line 408 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::generator_.

Referenced by bpp::AbstractKroneckerWordSubstitutionModel::fillBasicGenerator_().

◆ generator() [2/2]

virtual const Matrix<double>& bpp::SubstitutionModelInterface::generator ( ) const
pure virtualinherited
Returns
The normalized Markov generator matrix, i.e. all normalized rates of changes from state i to state j. The generator is normalized so that (i) $ \forall i; \sum_j Q_{i,j} = 0 $, meaning that $ $ \forall i; Q_{i,i} = -\sum_{j \neq i}Q_{i,j}$, and (ii) $ \sum_i Q_{i,i} \times \pi_i = -1$. This means that, under normalization, the mean rate of replacement at equilibrium is 1 and that time $t$ are measured in units of expected number of changes per site. Additionally, the rate_ attribute provides the possibility to increase or decrease this mean rate.

See Kosiol and Goldman (2005), Molecular Biology And Evolution 22(2) 193-9.

See also
Qij()

Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedSubstitutionModel, and bpp::AbstractSubstitutionModel.

Referenced by bpp::OneChangeRegisterTransitionModel::d2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::dPij_dt(), bpp::AbstractTotallyWrappedSubstitutionModel::generator(), bpp::InMixedSubstitutionModel::generator(), bpp::OneChangeRegisterTransitionModel::getd2Pij_dt2(), bpp::OneChangeRegisterTransitionModel::getdPij_dt(), bpp::OneChangeRegisterTransitionModel::getPij_t(), bpp::OneChangeRegisterTransitionModel::Pij_t(), bpp::OneChangeRegisterTransitionModel::updateMatrices_(), and updateMatrices_().

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::RegisterRatesSubstitutionModel::getAlphabet ( ) const
inlineoverridevirtual
Returns
A pointer toward the alphabet associated to this model.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 194 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getAlphabet().

◆ getAlphabetStateAsChar()

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 184 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getAlphabetStateAsChar().

◆ getAlphabetStateAsInt()

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 179 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getAlphabetStateAsInt().

◆ getAlphabetStates()

const std::vector<int>& bpp::RegisterRatesSubstitutionModel::getAlphabetStates ( ) const
inlineoverridevirtual

◆ getColumnRightEigenVectors() [1/2]

const Matrix<double>& bpp::AbstractSubstitutionModel::getColumnRightEigenVectors ( ) const
inlinevirtualinherited
Returns
A matrix with right eigen vectors. Each column in the matrix stands for an eigen vector.

Implements bpp::SubstitutionModelInterface.

Definition at line 428 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::rightEigenVectors_.

◆ getColumnRightEigenVectors() [2/2]

virtual const Matrix<double>& bpp::SubstitutionModelInterface::getColumnRightEigenVectors ( ) const
pure virtualinherited

◆ getd2Pij_dt2() [1/2]

◆ getd2Pij_dt2() [2/2]

◆ getdPij_dt() [1/2]

◆ getdPij_dt() [2/2]

◆ getEigenValues() [1/2]

const Vdouble& bpp::AbstractSubstitutionModel::getEigenValues ( ) const
inlinevirtualinherited
Returns
A vector with all real parts of the eigen values of the generator of this model;

Implements bpp::SubstitutionModelInterface.

Definition at line 418 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::eigenValues_.

◆ getEigenValues() [2/2]

virtual const Vdouble& bpp::SubstitutionModelInterface::getEigenValues ( ) const
pure virtualinherited

◆ 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]

◆ getIEigenValues() [1/2]

const Vdouble& bpp::AbstractSubstitutionModel::getIEigenValues ( ) const
inlinevirtualinherited
Returns
A vector with all imaginary parts of the eigen values of the generator of this model;

Implements bpp::SubstitutionModelInterface.

Definition at line 420 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::iEigenValues_.

◆ getIEigenValues() [2/2]

virtual const Vdouble& bpp::SubstitutionModelInterface::getIEigenValues ( ) const
pure virtualinherited

◆ 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/2]

std::vector<size_t> bpp::RegisterRatesSubstitutionModel::getModelStates ( const std::string &  code) const
inlineoverridevirtual

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.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 174 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getModelStates().

◆ getModelStates() [2/2]

std::vector<size_t> bpp::RegisterRatesSubstitutionModel::getModelStates ( int  code) const
inlineoverridevirtual

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.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 169 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getModelStates().

◆ getName()

std::string bpp::RegisterRatesSubstitutionModel::getName ( ) const
inlineoverridevirtual

Get the name of the model.

Returns
The name of this model.

Reimplemented from bpp::AbstractWrappedModel.

Definition at line 143 of file RegisterRatesSubstitutionModel.h.

◆ getNumberOfStates()

size_t bpp::RegisterRatesSubstitutionModel::getNumberOfStates ( ) const
inlineoverridevirtual

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.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 137 of file RegisterRatesSubstitutionModel.h.

References bpp::StateMapInterface::getNumberOfModelStates(), and stateMap().

Referenced by RegisterRatesSubstitutionModel(), and updateMatrices_().

◆ getPij_t() [1/2]

◆ getPij_t() [2/2]

◆ getRate()

double bpp::RegisterRatesSubstitutionModel::getRate ( ) const
inlineoverridevirtual

The rate of the substitution process.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 218 of file RegisterRatesSubstitutionModel.h.

References bpp::BranchModelInterface::getRate(), and bpp::AbstractWrappedTransitionModel::model().

◆ getRegisterName()

const std::string& bpp::RegisterRatesSubstitutionModel::getRegisterName ( ) const
inline

Definition at line 148 of file RegisterRatesSubstitutionModel.h.

References registerName_.

Referenced by bpp::BppOSubstitutionModelFormat::write().

◆ getRowLeftEigenVectors() [1/2]

const Matrix<double>& bpp::AbstractSubstitutionModel::getRowLeftEigenVectors ( ) const
inlinevirtualinherited
Returns
A matrix with left eigen vectors. Each row in the matrix stands for an eigen vector.

Implements bpp::SubstitutionModelInterface.

Definition at line 426 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::leftEigenVectors_.

◆ getRowLeftEigenVectors() [2/2]

virtual const Matrix<double>& bpp::SubstitutionModelInterface::getRowLeftEigenVectors ( ) const
pure virtualinherited

◆ getScale() [1/2]

double AbstractSubstitutionModel::getScale ( ) const
virtualinherited

◆ getScale() [2/2]

virtual double bpp::SubstitutionModelInterface::getScale ( ) const
pure virtualinherited

Get the scalar product of diagonal elements of the generator and the frequencies vector. If the generator is normalized, then scale=1. Otherwise each element must be multiplied by 1/scale.

Returns
Minus the scalar product of diagonal elements and the frequencies vector.

Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedSubstitutionModel, and bpp::AbstractSubstitutionModel.

Referenced by bpp::AbstractTotallyWrappedSubstitutionModel::getScale(), and bpp::InMixedSubstitutionModel::getScale().

◆ getStateMap()

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 204 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::getStateMap().

◆ isDiagonalizable() [1/2]

bool bpp::AbstractSubstitutionModel::isDiagonalizable ( ) const
inlinevirtualinherited
Returns
True if the model is diagonalizable in R.

Implements bpp::SubstitutionModelInterface.

Definition at line 422 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::isDiagonalizable_.

◆ isDiagonalizable() [2/2]

virtual bool bpp::SubstitutionModelInterface::isDiagonalizable ( ) const
pure virtualinherited

◆ isNonSingular() [1/2]

bool bpp::AbstractSubstitutionModel::isNonSingular ( ) const
inlinevirtualinherited
Returns
True is the model is non-singular.

Implements bpp::SubstitutionModelInterface.

Definition at line 424 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::isNonSingular_.

◆ isNonSingular() [2/2]

virtual bool bpp::SubstitutionModelInterface::isNonSingular ( ) const
pure virtualinherited

◆ isScalable() [1/2]

◆ isScalable() [2/2]

virtual bool bpp::SubstitutionModelInterface::isScalable ( ) const
pure virtualinherited

◆ Lik_t() [1/2]

virtual const Eigen::VectorXd& bpp::BranchModelInterface::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.
ttime
Exceptions
IndexOutOfBoundsExceptionif array position is out of range.
BadIntExceptionif states are not allowed in the associated alphabet.

Implemented in bpp::AbstractLkTransitionModel, bpp::TransitionModelInterface, bpp::TransitionFromTransitionModel, and bpp::MultinomialFromTransitionModel.

◆ 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()

◆ model_()

◆ normalize() [1/2]

◆ normalize() [2/2]

◆ operator=()

◆ 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().

◆ Qij() [1/2]

virtual double bpp::AbstractSubstitutionModel::Qij ( size_t  i,
size_t  j 
) const
inlinevirtualinherited

A method for computing all necessary matrices.

Returns
The rate in the generator of change from state i to state j.
See also
getStates();

Implements bpp::SubstitutionModelInterface.

Definition at line 430 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::generator_.

◆ Qij() [2/2]

◆ setDiagonal() [1/2]

◆ setDiagonal() [2/2]

virtual void bpp::SubstitutionModelInterface::setDiagonal ( )
pure virtualinherited

◆ setFreq() [1/2]

◆ setFreq() [2/2]

virtual void bpp::TransitionModelInterface::setFreq ( std::map< int, double > &  frequencies)
pure virtualinherited

◆ setFreqFromData() [1/2]

void AbstractTransitionModel::setFreqFromData ( const SequenceDataInterface data,
double  pseudoCount = 0 
)
overridevirtualinherited

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.

Reimplemented in bpp::RE08, bpp::WAG01, bpp::UserProteinSubstitutionModel, bpp::LG08, bpp::JTT92, bpp::JCprot, bpp::DSO78, bpp::Coala, bpp::K80, and bpp::JCnuc.

Definition at line 88 of file AbstractSubstitutionModel.cpp.

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

◆ setFreqFromData() [2/2]

virtual void bpp::TransitionModelInterface::setFreqFromData ( const SequenceDataInterface data,
double  pseudoCount = 0 
)
pure virtualinherited

◆ setRate()

void bpp::RegisterRatesSubstitutionModel::setRate ( double  rate)
inlineoverridevirtual

Set the rate of the model (must be positive).

Parameters
ratemust be positive.

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 216 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedTransitionModel::model_(), and bpp::BranchModelInterface::setRate().

◆ setRegStates_()

void bpp::RegisterRatesSubstitutionModel::setRegStates_ ( )
private

◆ setScalable() [1/2]

void bpp::AbstractSubstitutionModel::setScalable ( bool  scalable)
inlinevirtualinherited

sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example.

Implements bpp::SubstitutionModelInterface.

Definition at line 461 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::isScalable_.

◆ setScalable() [2/2]

virtual void bpp::SubstitutionModelInterface::setScalable ( bool  scalable)
pure virtualinherited

sets if model is scalable, ie scale can be changed. Default : true, set to false to avoid normalization for example.

Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedSubstitutionModel, and bpp::AbstractSubstitutionModel.

Referenced by bpp::AbstractTotallyWrappedSubstitutionModel::setScalable(), and bpp::InMixedSubstitutionModel::setScalable().

◆ setScale() [1/2]

◆ setScale() [2/2]

virtual void bpp::SubstitutionModelInterface::setScale ( double  scale)
pure virtualinherited

Multiplies the current generator by the given scale.

Parameters
scalethe scale by which the generator is multiplied.

Implemented in bpp::MarkovModulatedSubstitutionModel, bpp::InMixedSubstitutionModel, bpp::AbstractTotallyWrappedSubstitutionModel, and bpp::AbstractSubstitutionModel.

Referenced by bpp::AbstractTotallyWrappedSubstitutionModel::setScale(), and bpp::InMixedSubstitutionModel::setScale().

◆ setVerboseLevel()

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

◆ Sij() [1/2]

double bpp::AbstractSubstitutionModel::Sij ( size_t  i,
size_t  j 
) const
inlinevirtualinherited
Returns
The exchangeability between state i and state j.

By definition Sij(i,j) = Sij(j,i).

Implements bpp::SubstitutionModelInterface.

Definition at line 416 of file AbstractSubstitutionModel.h.

References bpp::AbstractSubstitutionModel::exchangeability_.

◆ Sij() [2/2]

virtual double bpp::SubstitutionModelInterface::Sij ( size_t  i,
size_t  j 
) const
pure virtualinherited

◆ stateMap()

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

Reimplemented from bpp::AbstractTransitionModel.

Definition at line 199 of file RegisterRatesSubstitutionModel.h.

References bpp::AbstractWrappedModel::stateMap().

Referenced by getNumberOfStates().

◆ substitutionModel()

const SubstitutionModelInterface& bpp::RegisterRatesSubstitutionModel::substitutionModel ( ) const
inlineoverridevirtual

◆ substitutionModel_()

SubstitutionModelInterface& bpp::RegisterRatesSubstitutionModel::substitutionModel_ ( )
inlineoverrideprotectedvirtual

Implements bpp::AbstractWrappedSubstitutionModel.

Definition at line 118 of file RegisterRatesSubstitutionModel.h.

References originalModel_.

Referenced by fireParameterChanged().

◆ transitionModel()

const TransitionModelInterface& bpp::RegisterRatesSubstitutionModel::transitionModel ( ) const
inlineoverridevirtual

Reimplemented from bpp::AbstractWrappedSubstitutionModel.

Definition at line 112 of file RegisterRatesSubstitutionModel.h.

References originalModel_.

◆ transitionModel_()

TransitionModelInterface& bpp::RegisterRatesSubstitutionModel::transitionModel_ ( )
inlineoverrideprotectedvirtual

Reimplemented from bpp::AbstractWrappedSubstitutionModel.

Definition at line 124 of file RegisterRatesSubstitutionModel.h.

References originalModel_.

◆ updateMatrices_()

void RegisterRatesSubstitutionModel::updateMatrices_ ( )
overrideprotectedvirtual

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.

Now check inversion and diagonalization

Reimplemented from bpp::AbstractSubstitutionModel.

Definition at line 67 of file RegisterRatesSubstitutionModel.cpp.

References bpp::SubstitutionModelInterface::generator(), bpp::AbstractSubstitutionModel::generator_, getNumberOfStates(), bpp::AbstractParameterAliasable::getParameter_(), bpp::Parameter::getValue(), nbTypes_, bpp::AbstractSubstitutionModel::setDiagonal(), substitutionModel(), bpp::AbstractSubstitutionModel::updateMatrices_(), vRates_, and vRegStates_.

Referenced by fireParameterChanged(), and RegisterRatesSubstitutionModel().

◆ verboseLevel()

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

Member Data Documentation

◆ alphabet_

◆ computeFreq_

bool bpp::AbstractSubstitutionModel::computeFreq_
protectedinherited

◆ d2pijt_

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

◆ dpijt_

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

◆ eigenDecompose_

bool bpp::AbstractSubstitutionModel::eigenDecompose_
protectedinherited

Tell if the eigen decomposition should be performed.

Definition at line 315 of file AbstractSubstitutionModel.h.

Referenced by bpp::AbstractSubstitutionModel::enableEigenDecomposition(), and bpp::AbstractSubstitutionModel::operator=().

◆ eigenValues_

◆ exchangeability_

◆ 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().

◆ generator_

RowMatrix<double> bpp::AbstractSubstitutionModel::generator_
protectedinherited

The generator matrix $Q$ of the model.

Definition at line 298 of file AbstractSubstitutionModel.h.

Referenced by bpp::AbstractCodonSubstitutionModel::completeMatrices_(), bpp::AbstractKroneckerCodonSubstitutionModel::completeMatrices_(), bpp::CodonSameAARateSubstitutionModel::compute_(), bpp::AbstractKroneckerWordSubstitutionModel::fillBasicGenerator_(), bpp::AbstractWordSubstitutionModel::fillBasicGenerator_(), bpp::AbstractSubstitutionModel::generator(), bpp::AbstractSubstitutionModel::getScale(), bpp::AbstractSubstitutionModel::operator=(), bpp::AbstractSubstitutionModel::Qij(), bpp::RE08::RE08(), bpp::AbstractSubstitutionModel::setDiagonal(), bpp::AnonymousSubstitutionModel::setGenerator(), bpp::AbstractSubstitutionModel::setScale(), bpp::AbstractSubstitutionModel::updateMatrices_(), bpp::AbstractWordSubstitutionModel::updateMatrices_(), bpp::BinarySubstitutionModel::updateMatrices_(), bpp::F84::updateMatrices_(), bpp::HKY85::updateMatrices_(), bpp::TwoParameterBinarySubstitutionModel::updateMatrices_(), bpp::AbstractReversibleSubstitutionModel::updateMatrices_(), bpp::AbstractDFPSubstitutionModel::updateMatrices_(), bpp::EquiprobableSubstitutionModel::updateMatrices_(), bpp::F81::updateMatrices_(), bpp::gBGC::updateMatrices_(), bpp::JCnuc::updateMatrices_(), bpp::K80::updateMatrices_(), bpp::L95::updateMatrices_(), bpp::RN95::updateMatrices_(), bpp::RN95s::updateMatrices_(), bpp::T92::updateMatrices_(), bpp::TN93::updateMatrices_(), bpp::POMO::updateMatrices_(), bpp::JCprot::updateMatrices_(), bpp::RE08::updateMatrices_(), updateMatrices_(), and bpp::YpR::updateMatrices_().

◆ iEigenValues_

◆ isDiagonalizable_

◆ isNonSingular_

◆ isScalable_

bool bpp::AbstractSubstitutionModel::isScalable_
protectedinherited

◆ leftEigenVectors_

◆ lik_

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

◆ nbTypes_

size_t bpp::RegisterRatesSubstitutionModel::nbTypes_
private

◆ originalModel_

std::unique_ptr<SubstitutionModelInterface> bpp::RegisterRatesSubstitutionModel::originalModel_
private

◆ 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_().

◆ registerName_

std::string bpp::RegisterRatesSubstitutionModel::registerName_
private

For output

Definition at line 39 of file RegisterRatesSubstitutionModel.h.

Referenced by getRegisterName(), and operator=().

◆ rightEigenVectors_

◆ size_

◆ stateMap_

◆ tmpMat_

◆ verboseLevel_

short bpp::AbstractTransitionModel::verboseLevel_
protectedinherited

◆ vPowGen_

◆ vRates_

Vdouble bpp::RegisterRatesSubstitutionModel::vRates_
private

vector of the rates of the register types

Definition at line 51 of file RegisterRatesSubstitutionModel.h.

Referenced by operator=(), and updateMatrices_().

◆ vRegStates_

VVVuint bpp::RegisterRatesSubstitutionModel::vRegStates_
private

Vector of register state -> vector of from states -> vector of to states (for acceleration purpose)

Definition at line 45 of file RegisterRatesSubstitutionModel.h.

Referenced by operator=(), RegisterRatesSubstitutionModel(), and updateMatrices_().


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