bpp-phyl3 3.0.0
KroneckerWordSubstitutionModel.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: The Bio++ Development Group
2//
3// SPDX-License-Identifier: CECILL-2.1
4
8
10
11// From SeqLib:
14
15using namespace bpp;
16
17// From the STL:
18#include <cmath>
19
20using namespace std;
21
22/******************************************************************************/
23
24KroneckerWordSubstitutionModel::KroneckerWordSubstitutionModel(
25 ModelList& modelList,
26 const string& prefix) :
27 AbstractParameterAliasable((prefix == "") ? "Kron." : prefix),
29 modelList,
30 (prefix == "") ? "Kron." : prefix)
31{
33}
34
36 std::shared_ptr<const Alphabet> alph,
37 std::shared_ptr<const StateMapInterface> stateMap,
38 const string& prefix) :
39 AbstractParameterAliasable((prefix == "") ? "Kron." : prefix),
40 AbstractKroneckerWordSubstitutionModel(alph, stateMap, (prefix == "") ? "Kron." : prefix)
41{
43}
44
46 std::unique_ptr<SubstitutionModelInterface> pmodel,
47 unsigned int num,
48 const string& prefix) :
49 AbstractParameterAliasable((prefix == "") ? "Kron." : prefix),
51 num,
52 (prefix == "") ? "Kron." : prefix)
53{
56}
57
59 ModelList& modelList,
60 const vector<set< size_t>>& vPos,
61 const string& prefix) :
62 AbstractParameterAliasable((prefix == "") ? "Kron." : prefix),
64 modelList, vPos,
65 (prefix == "") ? "Kron." : prefix)
66{
69}
70
72 std::unique_ptr<SubstitutionModelInterface> pmodel,
73 unsigned int num,
74 const vector<set< size_t>>& vPos,
75 const string& prefix) :
76 AbstractParameterAliasable((prefix == "") ? "Kron." : prefix),
78 num, vPos,
79 (prefix == "") ? "Kron." : prefix)
80{
83}
84
85
87{
88 return "Kron";
89}
bool enableEigenDecomposition()
Tell if eigenValues and Vectors must be computed.
void updateMatrices_()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
KroneckerWordSubstitutionModel(ModelList &modelList, const std::string &prefix="")
Build a new KroneckerWordSubstitutionModel object from a Vector of pointers to SubstitutionModels.
virtual std::string getName() const override
Get the name of the model.
A list of models, for building a WordSubstitutionModel.
Defines the basic types of data flow nodes.