bpp-phyl3  3.0.0
LGL08_CAT.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_PROTEIN_LGL08_CAT_H
6 #define BPP_PHYL_MODEL_PROTEIN_LGL08_CAT_H
7 
8 
9 #include "../AbstractBiblioMixedTransitionModel.h"
10 #include "../AbstractSubstitutionModel.h"
11 #include "../MixtureOfSubstitutionModels.h"
13 
14 namespace bpp
15 {
38 class LGL08_CAT :
40 {
41 public:
42  class EmbeddedModel :
44  {
45 private:
46  double proportion_;
47  std::string name_;
48 
49 public:
51  std::shared_ptr<const ProteicAlphabet> alpha,
52  std::string name,
53  unsigned int nbCat = 10);
54 
55  virtual ~EmbeddedModel() {}
56 
57  EmbeddedModel* clone() const override { return new EmbeddedModel(*this); }
58 
59  std::string getName() const override { return name_; }
60 
61  double getProportion() const { return proportion_; }
62  };
63 
64 public:
72  LGL08_CAT(std::shared_ptr<const ProteicAlphabet> alpha, unsigned int nbCat = 10);
73 
74  LGL08_CAT* clone() const override { return new LGL08_CAT(*this); }
75 
76  LGL08_CAT(const LGL08_CAT& mod2) :
83  {}
84 
86  {
88  return *this;
89  }
90 
91  uint getNumberOfCategories() const
92  {
93  return static_cast<uint>(mixedModelPtr_->getNumberOfModels());
94  }
95 
96  std::string getName() const override { return "LGL08_CAT";}
97 };
98 } // end of namespace bpp.
99 #endif // BPP_PHYL_MODEL_PROTEIN_LGL08_CAT_H
Abstract class for mixture models based on the bibliography.
AbstractBiblioMixedTransitionModel & operator=(const AbstractBiblioMixedTransitionModel &model)
std::unique_ptr< MixedTransitionModelInterface > mixedModelPtr_
Partial implementation of the SubstitutionModel interface for models that are set for matching the bi...
Specialisation abstract class for reversible protein substitution model.
Abstract class of Wrapping model class, where all methods are redirected from model().
double getProportion() const
Definition: LGL08_CAT.h:61
EmbeddedModel(std::shared_ptr< const ProteicAlphabet > alpha, std::string name, unsigned int nbCat=10)
Definition: LGL08_CAT.cpp:62
std::string getName() const override
Get the name of the model.
Definition: LGL08_CAT.h:59
EmbeddedModel * clone() const override
Definition: LGL08_CAT.h:57
The Le et al (2008) CAT substitution model for proteins.
Definition: LGL08_CAT.h:40
LGL08_CAT(const LGL08_CAT &mod2)
Definition: LGL08_CAT.h:76
std::string getName() const override
Get the name of the model.
Definition: LGL08_CAT.h:96
uint getNumberOfCategories() const
Definition: LGL08_CAT.h:91
LGL08_CAT * clone() const override
Definition: LGL08_CAT.h:74
LGL08_CAT & operator=(const LGL08_CAT &mod2)
Definition: LGL08_CAT.h:85
LGL08_CAT(std::shared_ptr< const ProteicAlphabet > alpha, unsigned int nbCat=10)
Build a CAT model, with original equilibrium frequencies, probabilities and rates.
Definition: LGL08_CAT.cpp:16
Defines the basic types of data flow nodes.