bpp-phyl3  3.0.0
ProteinSubstitutionModel.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_PROTEINSUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_PROTEIN_PROTEINSUBSTITUTIONMODEL_H
7 
8 
9 #include "../AbstractSubstitutionModel.h"
10 #include "../SubstitutionModel.h"
11 
12 // From bpp-seq:
14 
15 namespace bpp
16 {
21  public virtual SubstitutionModelInterface
22 {
23 public:
25 
26  virtual ProteinSubstitutionModelInterface* clone() const override = 0;
27 
28  virtual std::shared_ptr<const ProteicAlphabet> getProteicAlphabet() const = 0;
29 };
30 
31 
36  public virtual ProteinSubstitutionModelInterface,
38 {
39 public:
41 
43 };
44 
45 
52 {
53 public:
55  std::shared_ptr<const ProteicAlphabet> alpha,
56  std::shared_ptr<const StateMapInterface> stateMap,
57  const std::string& prefix) :
58  AbstractSubstitutionModel(alpha, stateMap, prefix) {}
59 
61 
62  AbstractProteinSubstitutionModel* clone() const override = 0;
63 
64 public:
65  std::shared_ptr<const ProteicAlphabet> getProteicAlphabet() const override
66  {
67  return std::dynamic_pointer_cast<const ProteicAlphabet>(alphabet_);
68  }
69 };
70 
77 {
78 public:
80  std::shared_ptr<const ProteicAlphabet> alpha,
81  std::shared_ptr<const StateMapInterface> stateMap,
82  const std::string& prefix) :
84 
86 
88 
89 public:
90  std::shared_ptr<const ProteicAlphabet> getProteicAlphabet() const override
91  {
92  return std::dynamic_pointer_cast<const ProteicAlphabet>(alphabet_);
93  }
94 };
95 } // end of namespace bpp.
96 #endif // BPP_PHYL_MODEL_PROTEIN_PROTEINSUBSTITUTIONMODEL_H
Specialisation abstract class for protein substitution model.
AbstractProteinSubstitutionModel(std::shared_ptr< const ProteicAlphabet > alpha, std::shared_ptr< const StateMapInterface > stateMap, const std::string &prefix)
AbstractProteinSubstitutionModel * clone() const override=0
std::shared_ptr< const ProteicAlphabet > getProteicAlphabet() const override
Specialisation abstract class for reversible protein substitution model.
std::shared_ptr< const ProteicAlphabet > getProteicAlphabet() const override
AbstractReversibleProteinSubstitutionModel * clone() const override=0
AbstractReversibleProteinSubstitutionModel(std::shared_ptr< const ProteicAlphabet > alpha, std::shared_ptr< const StateMapInterface > stateMap, const std::string &prefix)
Partial implementation of the ReversibleSubstitutionModel interface.
std::shared_ptr< const Alphabet > alphabet_
The alphabet relevant to this model.
const StateMapInterface & stateMap() const override
Specialized interface for protein reversible substitution model.
ProteinReversibleSubstitutionModelInterface * clone() const override=0
Specialized interface for protein substitution model.
virtual std::shared_ptr< const ProteicAlphabet > getProteicAlphabet() const =0
virtual ProteinSubstitutionModelInterface * clone() const override=0
Interface for reversible substitution models.
Interface for all substitution models.
Defines the basic types of data flow nodes.