47 #include <Bpp/Numeric/Matrix/MatrixTools.h> 54 AbstractParameterAliasable(
"Binary."),
62 addParameter_(
new Parameter(getNamespace() +
"kappa",
kappa_, &Parameter::R_PLUS_STAR));
70 kappa_ = getParameterValue(
"kappa");
238 kappa_ = freqs[1] / freqs[0];
239 setParameterValue(
"kappa",
kappa_);
const Matrix< double > & getdPij_dt(double d) const
const Matrix< double > & getd2Pij_dt2(double d) const
double dPij_dt(size_t i, size_t j, double d) const
const Matrix< double > & getPij_t(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.
BinarySubstitutionModel(const BinaryAlphabet *alpha, double kappa=1.)
Vdouble freq_
The vector of equilibrium frequencies.
Partial implementation of the ReversibleSubstitutionModel interface.
double Pij_t(size_t i, size_t j, double d) const
void setFreq(std::map< int, double > &freqs)
Set equilibrium frequencies.
void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
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...
double d2Pij_dt2(size_t i, size_t j, double d) const