bpp-phyl3  3.0.0
JCnuc.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_JCNUC_H
6 #define BPP_PHYL_MODEL_NUCLEOTIDE_JCNUC_H
7 
8 
9 #include "../AbstractSubstitutionModel.h"
11 
12 namespace bpp
13 {
95 class JCnuc :
97 {
98 private:
99  mutable double exp_;
101 
102 public:
103  JCnuc(std::shared_ptr<const NucleicAlphabet> alpha);
104 
105  virtual ~JCnuc() {}
106 
107  JCnuc* clone() const override { return new JCnuc(*this); }
108 
109 public:
110  double Pij_t (size_t i, size_t j, double d) const override;
111  double dPij_dt (size_t i, size_t j, double d) const override;
112  double d2Pij_dt2(size_t i, size_t j, double d) const override;
113  const Matrix<double>& getPij_t (double d) const override;
114  const Matrix<double>& getdPij_dt (double d) const override;
115  const Matrix<double>& getd2Pij_dt2(double d) const override;
116 
117  std::string getName() const override { return "JC69"; }
118 
127  void setFreqFromData(const SequenceDataInterface& data, double pseudoCount = 0) override {}
128 
129 protected:
135  void updateMatrices_() override;
136 };
137 } // end of namespace bpp.
138 #endif // BPP_PHYL_MODEL_NUCLEOTIDE_JCNUC_H
Specialisation abstract class for reversible nucleotide substitution model.
The Jukes-Cantor substitution model for nucleotides.
Definition: JCnuc.h:97
double dPij_dt(size_t i, size_t j, double d) const override
Definition: JCnuc.cpp:93
double d2Pij_dt2(size_t i, size_t j, double d) const override
Definition: JCnuc.cpp:103
JCnuc * clone() const override
Definition: JCnuc.h:107
std::string getName() const override
Get the name of the model.
Definition: JCnuc.h:117
const Matrix< double > & getd2Pij_dt2(double d) const override
Definition: JCnuc.cpp:139
virtual ~JCnuc()
Definition: JCnuc.h:105
void setFreqFromData(const SequenceDataInterface &data, double pseudoCount=0) override
This method is disabled in this model since frequencies are not free parameters.
Definition: JCnuc.h:127
double Pij_t(size_t i, size_t j, double d) const override
Definition: JCnuc.cpp:83
RowMatrix< double > p_
Definition: JCnuc.h:100
JCnuc(std::shared_ptr< const NucleicAlphabet > alpha)
Definition: JCnuc.cpp:15
void updateMatrices_() override
Definition: JCnuc.cpp:26
double exp_
Definition: JCnuc.h:99
const Matrix< double > & getPij_t(double d) const override
Definition: JCnuc.cpp:113
const Matrix< double > & getdPij_dt(double d) const override
Definition: JCnuc.cpp:126
Defines the basic types of data flow nodes.