8 #include "../FrequencySet/NucleotideFrequencySet.h"
21 shared_ptr<const NucleicAlphabet> alpha,
30 kappa1_(kappa1), kappa2_(kappa2),
31 piA_(piA), piC_(piC), piG_(piG), piT_(piT), piY_(), piR_(),
33 theta_(piG + piC), theta1_(piA / (1. - theta_)), theta2_(piG / theta_),
34 exp1_(), exp21_(), exp22_(), l_(), p_(size_, size_)
398 vector<string> thetas(3);
void addParameter_(Parameter *parameter)
void setParametersValues(const ParameterList ¶meters) override
std::string getNamespace() const override
const ParameterList & getParameters() const override
double getParameterValue(const std::string &name) const override
Specialisation abstract class for reversible nucleotide substitution model.
RowMatrix< double > generator_
The generator matrix of the model.
Vdouble eigenValues_
The vector of eigen values.
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible,...
RowMatrix< double > leftEigenVectors_
The matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular.
virtual bool isScalable() const
returns if model is scalable
RowMatrix< double > rightEigenVectors_
The matrix made of right eigen vectors (by column).
void setScale(double scale)
Multiplies the current generator by the given scale.
size_t size_
The number of states.
Vdouble freq_
The vector of equilibrium frequencies.
double rate_
The rate of the model (default: 1). The generator (and all its vectorial components) is independent o...
This class implements a state map where all resolved states are modeled.
const RowMatrix< Real > & getV() const
const std::vector< Real > & getRealEigenValues() const
static std::shared_ptr< IntervalConstraint > FREQUENCE_CONSTRAINT_SMALL
virtual ParameterList createSubList(const std::vector< std::string > &names) const
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
void resize(size_t nRows, size_t nCols)
double Pij_t(size_t i, size_t j, double d) const override
const Matrix< double > & getdPij_dt(double d) const override
void setFreq(std::map< int, double > &freqs) override
This method is over-defined to actualize the corresponding parameters piA, piT, piG and piC too.
const Matrix< double > & getd2Pij_dt2(double d) const override
void updateMatrices_() override
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
double dPij_dt(size_t i, size_t j, double d) const override
double d2Pij_dt2(size_t i, size_t j, double d) const override
const Matrix< double > & getPij_t(double d) const override
Defines the basic types of data flow nodes.
ExtendedFloat exp(const ExtendedFloat &ef)