41 #include "../FrequenciesSet/NucleotideFrequenciesSet.h" 43 #include <Bpp/Numeric/Matrix/MatrixTools.h> 46 #include <Bpp/Seq/Container/SequenceContainerTools.h> 57 const NucleicAlphabet* alpha,
63 AbstractParameterAliasable(
"F84."),
65 kappa_(kappa), piA_(piA), piC_(piC), piG_(piG), piT_(piT), piY_(), piR_(),
66 r_(), k1_(), k2_(), theta_(piG + piC), theta1_(piA / (1. - theta_)), theta2_(piG / theta_),
67 l_(), exp1_(), exp2_(), p_(size_, size_)
69 addParameter_(
new Parameter(
"F84.kappa", kappa, &Parameter::R_PLUS));
80 kappa_ = getParameterValue(
"kappa");
81 theta_ = getParameterValue(
"theta");
82 theta1_ = getParameterValue(
"theta1");
83 theta2_ = getParameterValue(
"theta2");
452 vector<string> thetas(3);
453 thetas[0] = getNamespace()+
"theta";
454 thetas[1] = getNamespace() +
"theta1";
455 thetas[2] = getNamespace() +
"theta2";
456 ParameterList pl = getParameters().subList(thetas);
460 setParametersValues(pl);
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible, this matrix is symetric.
This class implements a state map where all resolved states are modeled.
RowMatrix< double > rightEigenVectors_
The matrix made of right eigen vectors (by column).
Vdouble eigenValues_
The vector of eigen values.
Vdouble freq_
The vector of equilibrium frequencies.
const Matrix< double > & getPij_t(double d) const
double d2Pij_dt2(size_t i, size_t j, double d) const
const Matrix< double > & getd2Pij_dt2(double d) const
double dPij_dt(size_t i, size_t j, double d) const
Partial implementation of the ReversibleSubstitutionModel interface.
static IntervalConstraint FREQUENCE_CONSTRAINT_SMALL
double Pij_t(size_t i, size_t j, double d) const
const Matrix< double > & getdPij_dt(double d) const
RowMatrix< double > leftEigenVectors_
The matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular.
RowMatrix< double > generator_
The generator matrix of the model.
double rate_
The rate of the model (default: 1). The generator (and all its vectorial components) is independent o...
void setFreq(std::map< int, double > &)
This method is redefined to actualize the corresponding parameters piA, piT, piG and piC too...
void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
F84(const NucleicAlphabet *alpha, double kappa=1., double piA=0.25, double piC=0.25, double piG=0.25, double piT=0.25)