bpp-phyl3  3.0.0
KroneckerCodonDistanceSubstitutionModel.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_CODON_KRONECKERCODONDISTANCESUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_CODON_KRONECKERCODONDISTANCESUBSTITUTIONMODEL_H
7 
8 
11 
12 namespace bpp
13 {
45 {
46 public:
61  std::shared_ptr<const GeneticCode> gCode,
62  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
63  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
64 
79  std::shared_ptr<const GeneticCode> gCode,
80  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
81  const std::vector<std::set< size_t>>& vPos,
82  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
83 
100  std::shared_ptr<const GeneticCode> gCode,
101  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
102  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
103  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
104  std::shared_ptr<const AlphabetIndex2> pdist = nullptr);
105 
122  std::shared_ptr<const GeneticCode> gCode,
123  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
124  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
125  std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
126  const std::vector<std::set< size_t>>& vPos,
127  std::shared_ptr<const AlphabetIndex2> pdist = 0);
128 
130 
132  {
133  return new KroneckerCodonDistanceSubstitutionModel(*this);
134  }
135 
136 public:
137  void fireParameterChanged(const ParameterList& parameterlist) override;
138 
139  std::string getName() const override;
140 
141  double getCodonsMulRate(size_t i, size_t j) const override;
142 
143  void setNamespace(const std::string&) override;
144 };
145 } // end of namespace bpp.
146 #endif // BPP_PHYL_MODEL_CODON_KRONECKERCODONDISTANCESUBSTITUTIONMODEL_H
Abstract class for modelling of non-synonymous and synonymous substitution rates in codon models.
Abstract class for substitution models on codons allowing multiple substitutions.
Class for non-synonymous substitution models on codons with parameterized nucleotidic models,...
double getCodonsMulRate(size_t i, size_t j) const override
Returns the multiplicative rate specific to two codons specified by their number. The respective gene...
std::string getName() const override
Get the name of the model.
KroneckerCodonDistanceSubstitutionModel * clone() const override
void fireParameterChanged(const ParameterList &parameterlist) override
KroneckerCodonDistanceSubstitutionModel(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< NucleotideSubstitutionModelInterface > pmod, std::shared_ptr< const AlphabetIndex2 > pdist=nullptr)
Build a new KroneckerCodonDistanceSubstitutionModel object from three pointers to AbstractSubstitutio...
Defines the basic types of data flow nodes.