13 std::shared_ptr<const GeneticCode> gCode,
14 const string& prefix) :
17 gCode->getSourceAlphabet(),
21 tr_(1), trr_(1), tvv_(1), trv_(1), tsub_(1)
50 for (i = 0; i < 64; ++i)
52 for (j = 0; j < 64; ++j)
54 if (i == j ||
gCode_->isStop(
static_cast<int>(i)) ||
gCode_->isStop(
static_cast<int>(j)))
77 for (
size_t pos = 0; pos < 3; pos++)
79 int pi = (int) (pos == 0 ? i / 16 :
80 (pos == 1 ? (i / 4) % 4
82 int pj = (int) (pos == 0 ? j / 16 :
83 (pos == 1 ? (j / 4) % 4
86 nts += (pi == pj ? 0 : (
abs(pi - pj) == 2 ? 1 : 4));
AbstractDFPSubstitutionModel(std::shared_ptr< const GeneticCode > gCode, const std::string &prefix="AbstractDFP. ")
Build a new AbstractDFPSubstitutionModel object.
double getCodonsMulRate(size_t i, size_t j) const override
Calls the multiplication by the specific codon-codon rate.
void fireParameterChanged(const ParameterList ¶meters) override
Tells the model that a parameter value has changed.
void updateMatrices_() override
Method inherited from AbstractSubstitutionModel.
std::shared_ptr< const GeneticCode > gCode_
void addParameter_(Parameter *parameter)
double getParameterValue(const std::string &name) const override
RowMatrix< double > generator_
The generator matrix of the model.
void setDiagonal()
set the diagonal of the generator such that sum on each line equals 0.
virtual void updateMatrices_()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
bool enableEigenDecomposition()
Tell if eigenValues and Vectors must be computed.
This class implements a state map where all resolved states are modeled.
static const std::shared_ptr< IntervalConstraint > R_PLUS_STAR
Map the states of a given alphabet which have a model state.
Defines the basic types of data flow nodes.
ExtendedFloat abs(const ExtendedFloat &ef)