bpp-phyl3 3.0.0
AbstractKroneckerWordSubstitutionModel.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_ABSTRACTKRONECKERWORDSUBSTITUTIONMODEL_H
6#define BPP_PHYL_MODEL_ABSTRACTKRONECKERWORDSUBSTITUTIONMODEL_H
7
8#include <set>
9
11
12// From bpp-core:
14
15namespace bpp
16{
46{
47private:
54 std::vector<std::set< size_t>> sChangingPos_;
55
59 std::vector< RowMatrix<double>> vGenerators_;
60
61protected:
62 void initGenerators_();
63
68
69private:
74
75public:
89 ModelList& modelList,
90 const std::string& prefix);
91
107 ModelList& modelList,
108 const std::vector<std::set< size_t>>& vPos,
109 const std::string& prefix);
110
122 std::unique_ptr<SubstitutionModelInterface> pmodel,
123 unsigned int num,
124 const std::string& prefix);
125
139 std::unique_ptr<SubstitutionModelInterface> pmodel,
140 unsigned int num,
141 const std::vector<std::set< size_t>>& vPos,
142 const std::string& prefix);
143
144
146
148
150
151protected:
156 std::shared_ptr<const Alphabet> alph,
157 std::shared_ptr<const StateMapInterface> stateMap,
158 const std::string& prefix);
159
160 void setChangingPositions(const std::vector<std::set<size_t>>& vPos);
161};
162} // end of namespace bpp.
163#endif // BPP_PHYL_MODEL_ABSTRACTKRONECKERWORDSUBSTITUTIONMODEL_H
void setChangingPositions(const std::vector< std::set< size_t > > &vPos)
AbstractKroneckerWordSubstitutionModel & operator=(const AbstractKroneckerWordSubstitutionModel &)
bool checkChangingPositions_()
checks that the vector of changing positions is valid
std::vector< RowMatrix< double > > vGenerators_
vector of generators for computation purposes
AbstractKroneckerWordSubstitutionModel(ModelList &modelList, const std::string &prefix)
Build a new AbstractKroneckerWordSubstitutionModel object from a vector of pointers to SubstitutionMo...
void fillBasicGenerator_()
First fill of the generator, from the position model.
std::vector< std::set< size_t > > sChangingPos_
vector of sets of simultaneously changing positions.
const StateMapInterface & stateMap() const override
Abstract Basal class for words of substitution models.
A list of models, for building a WordSubstitutionModel.
Defines the basic types of data flow nodes.