bpp-phyl3  3.0.0
GY94.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_GY94_H
6 #define BPP_PHYL_MODEL_CODON_GY94_H
7 
9 
10 #include "../AbstractBiblioSubstitutionModel.h"
12 
13 namespace bpp
14 {
47 class GY94 :
50 {
51 private:
52  std::shared_ptr<const GranthamAAChemicalDistance> gacd_;
53  std::unique_ptr<CodonDistanceFrequenciesSubstitutionModel> pmodel_;
54 
55 public:
56  GY94(
57  std::shared_ptr<const GeneticCode> gc,
58  std::unique_ptr<CodonFrequencySetInterface> codonFreqs);
59 
60  virtual ~GY94();
61 
62  GY94(const GY94& gy94);
63 
64  GY94& operator=(const GY94& gy94);
65 
66  GY94* clone() const override { return new GY94(*this); }
67 
68 public:
69  std::string getName() const override { return "GY94"; }
70 
71  const SubstitutionModelInterface& substitutionModel() const override { return *pmodel_; }
72 
73  std::shared_ptr<const GeneticCode> getGeneticCode() const { return pmodel_->getGeneticCode(); }
74 
75  double getCodonsMulRate(size_t i, size_t j) const { return pmodel_->getCodonsMulRate(i, j); }
76 
77 protected:
79 };
80 } // end of namespace bpp.
81 #endif // BPP_PHYL_MODEL_CODON_GY94_H
The Goldman and Yang (1994) substitution model for codons.
Definition: GY94.h:50
std::string getName() const override
Get the name of the model.
Definition: GY94.h:69
double getCodonsMulRate(size_t i, size_t j) const
Definition: GY94.h:75
GY94 * clone() const override
Definition: GY94.h:66
virtual ~GY94()
Definition: GY94.cpp:72
std::unique_ptr< CodonDistanceFrequenciesSubstitutionModel > pmodel_
Definition: GY94.h:53
std::shared_ptr< const GeneticCode > getGeneticCode() const
Definition: GY94.h:73
std::shared_ptr< const GranthamAAChemicalDistance > gacd_
Definition: GY94.h:52
const SubstitutionModelInterface & substitutionModel() const override
Definition: GY94.h:71
GY94 & operator=(const GY94 &gy94)
Definition: GY94.cpp:65
GY94(std::shared_ptr< const GeneticCode > gc, std::unique_ptr< CodonFrequencySetInterface > codonFreqs)
Definition: GY94.cpp:14
SubstitutionModelInterface & substitutionModel_() override
Definition: GY94.h:78
Interface for reversible substitution models.
Interface for all substitution models.
Defines the basic types of data flow nodes.