bpp-phyl3  3.0.0
WordSubstitutionModel.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_WORDSUBSTITUTIONMODEL_H
6 #define BPP_PHYL_MODEL_WORDSUBSTITUTIONMODEL_H
7 
8 
10 
11 // From bpp-core
13 #include <Bpp/BppVector.h>
14 
15 namespace bpp
16 {
43 {
44 public:
56  WordSubstitutionModel(ModelList& modelList, const std::string& prefix = "");
57 
69  std::unique_ptr<SubstitutionModelInterface> pmodel,
70  unsigned int num,
71  const std::string& prefix = "");
72 
74 
75  WordSubstitutionModel* clone() const override { return new WordSubstitutionModel(*this); }
76 
77 protected:
82  std::shared_ptr<const Alphabet> alphabet,
83  std::shared_ptr<const StateMapInterface> stateMap,
84  const std::string& prefix = "");
85 
86  virtual void updateMatrices_() override;
87 
88  virtual void completeMatrices_() override;
89 
90 public:
91  virtual const RowMatrix<double>& getPij_t(double d) const override;
92 
93  virtual const RowMatrix<double>& getdPij_dt(double d) const override;
94 
95  virtual const RowMatrix<double>& getd2Pij_dt2(double d) const override;
96 
97  virtual std::string getName() const override;
98 };
99 } // end of namespace bpp.
100 #endif // BPP_PHYL_MODEL_WORDSUBSTITUTIONMODEL_H
const Alphabet & alphabet() const override
const StateMapInterface & stateMap() const override
Abstract Basal class for words of substitution models.
A list of models, for building a WordSubstitutionModel.
Basal class for words of substitution models.
WordSubstitutionModel * clone() const override
virtual void updateMatrices_() override
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
virtual void completeMatrices_() override
Called by updateMatrices to handle specific modifications for inheriting classes.
WordSubstitutionModel(ModelList &modelList, const std::string &prefix="")
Build a new WordSubstitutionModel object from a Vector of pointers to SubstitutionModels.
virtual const RowMatrix< double > & getdPij_dt(double d) const override
virtual const RowMatrix< double > & getd2Pij_dt2(double d) const override
virtual const RowMatrix< double > & getPij_t(double d) const override
virtual std::string getName() const override
Get the name of the model.
Defines the basic types of data flow nodes.