42 #include <Bpp/Numeric/Matrix/MatrixTools.h> 45 #include <Bpp/Seq/Container/SequenceContainerTools.h> 56 const NucleicAlphabet* alpha,
61 AbstractParameterAliasable(
"SSR."),
63 beta_(beta), gamma_(gamma), delta_(delta), theta_(theta),
64 piA_((1. - theta) / 2.), piC_(theta / 2.), piG_(theta / 2.), piT_((1. - theta) / 2.)
66 addParameter_(
new Parameter(
"SSR.beta" , beta , &Parameter::R_PLUS_STAR));
67 addParameter_(
new Parameter(
"SSR.gamma", gamma, &Parameter::R_PLUS_STAR));
68 addParameter_(
new Parameter(
"SSR.delta", delta, &Parameter::R_PLUS_STAR));
69 addParameter_(
new Parameter(
"SSR.theta" , theta , &Parameter::PROP_CONSTRAINT_EX));
77 beta_ = getParameterValue(
"beta");
78 gamma_ = getParameterValue(
"gamma");
79 delta_ = getParameterValue(
"delta");
80 theta_ = getParameterValue(
"theta");
114 setParameterValue(
"theta",
piC_ +
piG_);
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.
Vdouble freq_
The vector of equilibrium frequencies.
void setFreq(std::map< int, double > &)
This method is redefined to actualize the corresponding parameters theta too.
virtual void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
Partial implementation of the ReversibleSubstitutionModel interface.
void updateMatrices()
Compute and diagonalize the matrix, and fill the eigenValues_, leftEigenVectors_ and rightEigenVecto...
SSR(const NucleicAlphabet *alpha, double beta=1., double gamma=1., double delta=1., double theta=0.5)