41 #include "../FrequenciesSet/NucleotideFrequenciesSet.h" 43 #include <Bpp/Numeric/Matrix/MatrixTools.h> 46 #include <Bpp/Seq/Container/SequenceContainerTools.h> 58 const NucleicAlphabet* alpha,
64 AbstractParameterAliasable(
"HKY85."),
66 kappa_(kappa), k1_(), k2_(), r_(),
67 piA_(piA), piC_(piC), piG_(piG), piT_(piT), piY_(), piR_(),
68 theta_(piG + piC), theta1_(piA / (1. - theta_)), theta2_(piG / theta_),
69 exp1_(), exp21_(), exp22_(), l_(), p_(size_, size_)
71 addParameter_(
new Parameter(
"HKY85.kappa", kappa, &Parameter::R_PLUS_STAR));
82 kappa_ = getParameterValue(
"kappa");
83 theta_ = getParameterValue(
"theta");
84 theta1_ = getParameterValue(
"theta1");
85 theta2_ = getParameterValue(
"theta2");
463 vector<string> thetas(3);
464 thetas[0] = getNamespace() +
"theta";
465 thetas[1] = getNamespace() +
"theta1";
466 thetas[2] = getNamespace() +
"theta2";
467 ParameterList pl = getParameters().subList(thetas);
471 setParametersValues(pl);
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible, this matrix is symetric.
void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
double dPij_dt(size_t i, size_t j, double d) const
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.
void setFreq(std::map< int, double > &freqs)
This method is redefined to actualize the corresponding parameters piA, piT, piG and piC too...
Vdouble freq_
The vector of equilibrium frequencies.
const Matrix< double > & getdPij_dt(double d) const
double d2Pij_dt2(size_t i, size_t j, double d) const
HKY85(const NucleicAlphabet *alpha, double kappa=1., double piA=0.25, double piC=0.25, double piG=0.25, double piT=0.25)
Partial implementation of the ReversibleSubstitutionModel interface.
static IntervalConstraint FREQUENCE_CONSTRAINT_SMALL
RowMatrix< double > leftEigenVectors_
The matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular.
const Matrix< double > & getPij_t(double d) const
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...
const Matrix< double > & getd2Pij_dt2(double d) const
double Pij_t(size_t i, size_t j, double d) const