bpp-phyl3  3.0.0
YNGP_M8.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_M8_H
6 #define BPP_PHYL_MODEL_CODON_YNGP_M8_H
7 
9 
10 #include "YNGP_M.h"
11 
12 namespace bpp
13 {
38 class YNGP_M8 :
39  public YNGP_M
40 {
41 private:
45  bool neutral_;
46 
47 public:
52  YNGP_M8(
53  std::shared_ptr<const GeneticCode> gc,
54  std::unique_ptr<CodonFrequencySetInterface> codonFreqs,
55  unsigned int nbclass,
56  bool neutral = false);
57 
58  YNGP_M8* clone() const override { return new YNGP_M8(*this); }
59 
60  YNGP_M8(const YNGP_M8& mod2) :
66  YNGP_M(mod2),
67  neutral_(mod2.neutral_)
68  {}
69 
70  YNGP_M8& operator=(const YNGP_M8& mod2)
71  {
72  YNGP_M::operator=(mod2);
73  neutral_ = mod2.neutral_;
74  return *this;
75  }
76 
77  std::string getName() const override { return neutral_ ? "YNGP_M8a" : "YNGP_M8"; }
78 
79 protected:
80  void updateMatrices_() override;
81 };
82 } // end of namespace bpp.
83 #endif // BPP_PHYL_MODEL_CODON_YNGP_M8_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) M8 substitution model for codons.
Definition: YNGP_M8.h:40
YNGP_M8(std::shared_ptr< const GeneticCode > gc, std::unique_ptr< CodonFrequencySetInterface > codonFreqs, unsigned int nbclass, bool neutral=false)
Constructor that requires the number of classes of the BetaDiscreteDistribution.
Definition: YNGP_M8.cpp:19
YNGP_M8 * clone() const override
Definition: YNGP_M8.h:58
void updateMatrices_() override
Definition: YNGP_M8.cpp:123
YNGP_M8 & operator=(const YNGP_M8 &mod2)
Definition: YNGP_M8.h:70
bool neutral_
If parameter omega=1.
Definition: YNGP_M8.h:45
YNGP_M8(const YNGP_M8 &mod2)
Definition: YNGP_M8.h:60
std::string getName() const override
Get the name of the model.
Definition: YNGP_M8.h:77
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.