bpp-phyl3  3.0.0
YNGP_M9.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_YNGP_M9_H
6 #define BPP_PHYL_MODEL_CODON_YNGP_M9_H
7 
9 
10 #include "YNGP_M.h"
11 
12 namespace bpp
13 {
34 class YNGP_M9 :
35  public YNGP_M
36 {
37 private:
38  unsigned int nBeta_, nGamma_;
39 
40 public:
45  YNGP_M9(
46  std::shared_ptr<const GeneticCode> gc,
47  std::unique_ptr<CodonFrequencySetInterface> codonFreqs,
48  unsigned int nbBeta,
49  unsigned int nbGamma);
50 
51  YNGP_M9* clone() const override { return new YNGP_M9(*this); }
52 
53  YNGP_M9(const YNGP_M9& mod2) :
59  YNGP_M(mod2),
60  nBeta_(mod2.nBeta_),
61  nGamma_(mod2.nGamma_)
62  {}
63 
64  YNGP_M9& operator=(const YNGP_M9& mod2)
65  {
66  YNGP_M::operator=(mod2);
67  nBeta_ = mod2.nBeta_;
68  nGamma_ = mod2.nGamma_;
69  return *this;
70  }
71 
72 public:
73  std::string getName() const override { return "YNGP_M9"; }
74 
75  unsigned int getNBeta() const
76  {
77  return nBeta_;
78  }
79 
80  unsigned int getNGamma() const
81  {
82  return nGamma_;
83  }
84 
85 protected:
86  void updateMatrices_() override;
87 };
88 } // end of namespace bpp.
89 #endif // BPP_PHYL_MODEL_CODON_YNGP_M9_H
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
Abstract class of Wrapping model class, where all methods are redirected from model().
The Yang et al (2000) M9 substitution model for codons.
Definition: YNGP_M9.h:36
YNGP_M9 & operator=(const YNGP_M9 &mod2)
Definition: YNGP_M9.h:64
YNGP_M9(const YNGP_M9 &mod2)
Definition: YNGP_M9.h:53
unsigned int nGamma_
Definition: YNGP_M9.h:38
YNGP_M9 * clone() const override
Definition: YNGP_M9.h:51
std::string getName() const override
Get the name of the model.
Definition: YNGP_M9.h:73
unsigned int nBeta_
Definition: YNGP_M9.h:38
unsigned int getNBeta() const
Definition: YNGP_M9.h:75
YNGP_M9(std::shared_ptr< const GeneticCode > gc, std::unique_ptr< CodonFrequencySetInterface > codonFreqs, unsigned int nbBeta, unsigned int nbGamma)
Constructor that requires the number of classes of the BetaDiscreteDistribution and the GammaDiscrete...
Definition: YNGP_M9.cpp:19
unsigned int getNGamma() const
Definition: YNGP_M9.h:80
void updateMatrices_() override
Definition: YNGP_M9.cpp:115
Abstract generic class for The Yang et al (2000) M substitution models for codons....
Definition: YNGP_M.h:32
YNGP_M & operator=(const YNGP_M &mod2)
Definition: YNGP_M.h:64
Defines the basic types of data flow nodes.