bpp-phyl3  3.0.0
YNGP_M10.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_M10_H
6 #define BPP_PHYL_MODEL_CODON_YNGP_M10_H
7 
9 
10 #include "YNGP_M.h"
11 
12 namespace bpp
13 {
35 class YNGP_M10 :
36  public YNGP_M
37 {
38 private:
39  unsigned int nBeta_, nGamma_;
40 
41 public:
46  YNGP_M10(
47  std::shared_ptr<const GeneticCode> gc,
48  std::unique_ptr<CodonFrequencySetInterface> codonFreqs,
49  unsigned int nbBeta,
50  unsigned int nbGamma);
51 
52  YNGP_M10* clone() const override { return new YNGP_M10(*this); }
53 
54  YNGP_M10(const YNGP_M10& mod2) :
60  YNGP_M(mod2),
61  nBeta_(mod2.nBeta_),
62  nGamma_(mod2.nGamma_)
63  {}
64 
65  YNGP_M10& operator=(const YNGP_M10& mod2)
66  {
67  YNGP_M::operator=(mod2);
68  nBeta_ = mod2.nBeta_;
69  nGamma_ = mod2.nGamma_;
70  return *this;
71  }
72 
73 protected:
74  void updateMatrices_() override;
75 
76 public:
77  std::string getName() const override { return "YNGP_M10"; }
78 
79  unsigned int getNBeta() const
80  {
81  return nBeta_;
82  }
83 
84  unsigned int getNGamma() const
85  {
86  return nGamma_;
87  }
88 };
89 } // end of namespace bpp.
90 #endif // BPP_PHYL_MODEL_CODON_YNGP_M10_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) M10 substitution model for codons.
Definition: YNGP_M10.h:37
YNGP_M10 & operator=(const YNGP_M10 &mod2)
Definition: YNGP_M10.h:65
YNGP_M10(const YNGP_M10 &mod2)
Definition: YNGP_M10.h:54
std::string getName() const override
Get the name of the model.
Definition: YNGP_M10.h:77
YNGP_M10(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_M10.cpp:19
unsigned int getNBeta() const
Definition: YNGP_M10.h:79
unsigned int nGamma_
Definition: YNGP_M10.h:39
unsigned int getNGamma() const
Definition: YNGP_M10.h:84
YNGP_M10 * clone() const override
Definition: YNGP_M10.h:52
void updateMatrices_() override
Definition: YNGP_M10.cpp:116
unsigned int nBeta_
Definition: YNGP_M10.h:39
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.