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
15namespace bpp
16{
21 public virtual SubstitutionModelInterface
22{
23public:
25
26 virtual ProteinSubstitutionModelInterface* clone() const override = 0;
27
28 virtual std::shared_ptr<const ProteicAlphabet> getProteicAlphabet() const = 0;
29};
30
31
38{
39public:
41
43};
44
45
52{
53public:
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
63
64public:
65 std::shared_ptr<const ProteicAlphabet> getProteicAlphabet() const override
66 {
67 return std::dynamic_pointer_cast<const ProteicAlphabet>(alphabet_);
68 }
69};
70
77{
78public:
80 std::shared_ptr<const ProteicAlphabet> alpha,
81 std::shared_ptr<const StateMapInterface> stateMap,
82 const std::string& prefix) :
84
86
88
89public:
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.
AbstractReversibleProteinSubstitutionModel * clone() const override=0
std::shared_ptr< const ProteicAlphabet > getProteicAlphabet() const override
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 ProteinSubstitutionModelInterface * clone() const override=0
virtual std::shared_ptr< const ProteicAlphabet > getProteicAlphabet() const =0
Interface for reversible substitution models.
Interface for all substitution models.
Defines the basic types of data flow nodes.