bpp-phyl3  3.0.0
NucleotideSubstitutionModel.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_NUCLEOTIDESUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_NUCLEOTIDE_NUCLEOTIDESUBSTITUTIONMODEL_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 
27 
28 public:
29  virtual std::shared_ptr<const NucleicAlphabet> getNucleicAlphabet() const = 0;
30 };
31 
32 
39 {
40 public:
42 
44 };
45 
46 
53 {
54 public:
56  std::shared_ptr<const NucleicAlphabet> alpha,
57  std::shared_ptr<const StateMapInterface> stateMap,
58  const std::string& prefix) :
59  AbstractSubstitutionModel(alpha, stateMap, prefix) {}
60 
62 
64 
65 public:
66  std::shared_ptr<const NucleicAlphabet> getNucleicAlphabet() const override
67  {
68  return std::dynamic_pointer_cast<const NucleicAlphabet>(alphabet_);
69  }
70 };
71 
78 {
79 public:
81  std::shared_ptr<const NucleicAlphabet> alpha,
82  std::shared_ptr<const StateMapInterface> stateMap,
83  const std::string& prefix) :
85 
87 
89 
90 public:
91  std::shared_ptr<const NucleicAlphabet> getNucleicAlphabet() const override
92  {
93  return std::dynamic_pointer_cast<const NucleicAlphabet>(alphabet_);
94  }
95 };
96 } // end of namespace bpp.
97 #endif // BPP_PHYL_MODEL_NUCLEOTIDE_NUCLEOTIDESUBSTITUTIONMODEL_H
Specialisation abstract class for nucleotide substitution model.
AbstractNucleotideSubstitutionModel * clone() const override=0
AbstractNucleotideSubstitutionModel(std::shared_ptr< const NucleicAlphabet > alpha, std::shared_ptr< const StateMapInterface > stateMap, const std::string &prefix)
std::shared_ptr< const NucleicAlphabet > getNucleicAlphabet() const override
Specialisation abstract class for reversible nucleotide substitution model.
AbstractReversibleNucleotideSubstitutionModel * clone() const override=0
std::shared_ptr< const NucleicAlphabet > getNucleicAlphabet() const override
AbstractReversibleNucleotideSubstitutionModel(std::shared_ptr< const NucleicAlphabet > 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
Specialisation interface for rversible nucleotide substitution model.
NucleotideReversibleSubstitutionModelInterface * clone() const override=0
Specialisation interface for nucleotide substitution model.
NucleotideSubstitutionModelInterface * clone() const override=0
virtual std::shared_ptr< const NucleicAlphabet > getNucleicAlphabet() const =0
Interface for reversible substitution models.
Interface for all substitution models.
Defines the basic types of data flow nodes.