bpp-phyl3  3.0.0
KroneckerCodonDistanceFrequenciesSubstitutionModel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_PHYL_MODEL_CODON_KRONECKERCODONDISTANCEFREQUENCIESSUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_CODON_KRONECKERCODONDISTANCEFREQUENCIESSUBSTITUTIONMODEL_H
7 
8 
12 
13 namespace bpp
14 {
57 {
58 public:
74  std::shared_ptr<const GeneticCode> gCode,
75  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
76  std::unique_ptr<CodonFrequencySetInterface> pfreq,
77  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
78 
94  std::shared_ptr<const GeneticCode> gCode,
95  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
96  const std::vector<std::set< size_t>>& vPos,
97  std::unique_ptr<CodonFrequencySetInterface> pfreq,
98  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
99 
117  std::shared_ptr<const GeneticCode> gCode,
118  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
119  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
120  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
121  std::unique_ptr<CodonFrequencySetInterface> pfreq,
122  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
123 
141  std::shared_ptr<const GeneticCode> gCode,
142  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
143  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
144  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
145  const std::vector<std::set< size_t>>& vPos,
146  std::unique_ptr<CodonFrequencySetInterface> pfreq,
147  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
148 
150 
152  {
154  }
155 
156 public:
157  void fireParameterChanged(const ParameterList& parameterlist) override;
158 
159  std::string getName() const override;
160 
161  double getCodonsMulRate(size_t i, size_t j) const override;
162 
163  void setNamespace(const std::string&) override;
164 
165  void setFreq(std::map<int, double>& frequencies) override;
166 
168  {
170  }
171 
172  bool hasCodonFrequencySet() const override
173  {
175  }
176 };
177 } // end of namespace bpp.
178 #endif // BPP_PHYL_MODEL_CODON_KRONECKERCODONDISTANCEFREQUENCIESSUBSTITUTIONMODEL_H
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models.
Abstract Class for substitution models on codons parametrized by frequencies.
const CodonFrequencySetInterface & codonFrequencySet() const override
Abstract class for substitution models on codons allowing multiple substitutions.
Parametrize a set of state frequencies for codons.
Class for non-synonymous substitution models on codons with parameterized equilibrium frequencies and...
KroneckerCodonDistanceFrequenciesSubstitutionModel(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< NucleotideSubstitutionModelInterface > pmod, std::unique_ptr< CodonFrequencySetInterface > pfreq, std::shared_ptr< const AlphabetIndex2 > pdist=nullptr)
Build a new KroneckerCodonDistanceFrequenciesSubstitutionModel object from three pointers to Abstract...
KroneckerCodonDistanceFrequenciesSubstitutionModel * clone() const 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...
Defines the basic types of data flow nodes.