bpp-phyl3 3.0.0
DFPDistanceFrequenciesSubstitutionModel.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
6
7using namespace bpp;
8
9using namespace std;
10
11/******************************************************************************/
12
13DFPDistanceFrequenciesSubstitutionModel::DFPDistanceFrequenciesSubstitutionModel(
14 shared_ptr<const GeneticCode> gCode,
15 unique_ptr<CodonFrequencySetInterface> pfreq,
16 shared_ptr<const AlphabetIndex2> pdist) :
17 AbstractParameterAliasable("DFPDistFreq."),
18 AbstractDFPSubstitutionModel(gCode, "DFPDistFreq."),
19 AbstractCodonDistanceSubstitutionModel(pdist, gCode, "DFPDistFreq."),
20 AbstractCodonFrequenciesSubstitutionModel(std::move(pfreq), "DFPDistFreq.")
21{
23}
24
26{
27 return "DFPDistFreq";
28}
29
31{
34
35 // Beware: must be called last, since it calls updateMatrices
37}
38
40{
44}
45
47{
52}
53
54void DFPDistanceFrequenciesSubstitutionModel::setFreq(map<int, double>& frequencies)
55{
58}
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models.
double getCodonsMulRate(size_t i, size_t j) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
void fireParameterChanged(const ParameterList &parameters) override
Abstract Class for substitution models on codons parametrized by frequencies.
void setFreq(std::map< int, double > &frequencies) override
void fireParameterChanged(const ParameterList &parameters) override
double getCodonsMulRate(size_t, size_t) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
const CodonFrequencySetInterface & codonFrequencySet() const override
Class for neutral substitution models on triplets, following the mutation process proposed in Doron-F...
double getCodonsMulRate(size_t i, size_t j) const override
Calls the multiplication by the specific codon-codon rate.
void fireParameterChanged(const ParameterList &parameters) override
Tells the model that a parameter value has changed.
void updateMatrices_() override
Method inherited from AbstractSubstitutionModel.
void setNamespace(const std::string &prefix)
std::string getName() const override
Get the name of the model.
void setFreq(std::map< int, double > &frequencies) override
double getCodonsMulRate(size_t i, size_t j) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
void fireParameterChanged(const ParameterList &parameterlist) override
virtual const Vdouble & getFrequencies() const =0
Defines the basic types of data flow nodes.