bpp-phyl3  3.0.0
gBGC.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_NUCLEOTIDE_GBGC_H
6 #define BPP_PHYL_MODEL_NUCLEOTIDE_GBGC_H
7 
9 
10 #include "../AbstractSubstitutionModel.h"
12 
13 // From SeqLib:
15 
16 // From Utils:
17 
18 using namespace std;
19 
20 namespace bpp
21 {
46 class gBGC :
48 {
49 private:
50  std::unique_ptr<NucleotideSubstitutionModelInterface> model_;
51  std::string nestedPrefix_;
52 
56  double B_;
57 
58 public:
62  gBGC(
63  std::shared_ptr<const NucleicAlphabet>,
64  std::unique_ptr<NucleotideSubstitutionModelInterface>,
65  double B = 0);
66 
67  gBGC(const gBGC&);
68 
69  gBGC& operator=(const gBGC& gbgc);
70 
71  gBGC* clone() const override { return new gBGC(*this); }
72 
73  virtual ~gBGC() {}
74 
75 public:
76  std::string getName() const override
77  {
78  return model_->getName() + "+gBGC";
79  }
80 
81  size_t getNumberOfStates() const override { return model_->getNumberOfStates(); }
82 
83  void fireParameterChanged(const ParameterList&) override;
84 
85  const SubstitutionModelInterface& nestedModel() const { return *model_; }
86 
87  void setNamespace(const std::string&) override;
88 
89 protected:
90  void updateMatrices_() override;
91 };
92 }
93 #endif // BPP_PHYL_MODEL_NUCLEOTIDE_GBGC_H
Specialisation abstract class for nucleotide substitution model.
Interface for all substitution models.
gBGC model.
Definition: gBGC.h:48
std::string nestedPrefix_
Definition: gBGC.h:51
gBGC * clone() const override
Definition: gBGC.h:71
std::unique_ptr< NucleotideSubstitutionModelInterface > model_
Definition: gBGC.h:50
std::string getName() const override
Get the name of the model.
Definition: gBGC.h:76
size_t getNumberOfStates() const override
Get the number of states.
Definition: gBGC.h:81
virtual ~gBGC()
Definition: gBGC.h:73
const SubstitutionModelInterface & nestedModel() const
Definition: gBGC.h:85
double B_
the value of the bias.
Definition: gBGC.h:56
Defines the basic types of data flow nodes.