13 std::shared_ptr<const GeneticCode> gCode,
14 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
15 const string& prefix) :
18 gCode->getSourceAlphabet(),
26 for (i = 0; i < 3; i++)
33 VSubMod_[0]->enableEigenDecomposition(0);
40 std::shared_ptr<const GeneticCode> gCode,
41 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod,
42 const std::vector<std::set< size_t>>& vPos,
43 const std::string& prefix) :
46 gCode->getSourceAlphabet(),
53 shared_ptr<NucleotideSubstitutionModelInterface> pmod2 = std::move(pmod);
55 for (i = 0; i < 3; i++)
61 pmod2->enableEigenDecomposition(0);
69 std::shared_ptr<const GeneticCode> gCode,
70 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
71 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
72 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
73 const string& prefix) :
76 gCode->getSourceAlphabet(),
83 VSubMod_.push_back(std::move(pmod1));
86 VSubMod_[0]->enableEigenDecomposition(0);
89 VSubMod_.push_back(std::move(pmod2));
92 VSubMod_[1]->enableEigenDecomposition(0);
95 VSubMod_.push_back(std::move(pmod3));
98 VSubMod_[2]->enableEigenDecomposition(0);
105 std::shared_ptr<const GeneticCode> gCode,
106 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod1,
107 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod2,
108 std::unique_ptr<NucleotideSubstitutionModelInterface> pmod3,
109 const std::vector<std::set< size_t>>& vPos,
110 const std::string& prefix) :
113 gCode->getSourceAlphabet(),
120 VSubMod_.push_back(std::move(pmod1));
123 VSubMod_[0]->enableEigenDecomposition(0);
126 VSubMod_.push_back(std::move(pmod2));
129 VSubMod_[1]->enableEigenDecomposition(0);
132 VSubMod_.push_back(std::move(pmod3));
135 VSubMod_[2]->enableEigenDecomposition(0);
148 for (i = 0; i < salph; i++)
150 for (j = 0; j < salph; j++)
152 if (
gCode_->isStop(
static_cast<int>(i)) ||
gCode_->isStop(
static_cast<int>(j)))
std::shared_ptr< const GeneticCode > gCode_
AbstractKroneckerCodonSubstitutionModel(std::shared_ptr< const GeneticCode > gCode, std::unique_ptr< NucleotideSubstitutionModelInterface > pmod, const std::string &st)
Build a new AbstractKroneckerCodonSubstitutionModel object from a pointer to a NucleotideSubstitution...
void completeMatrices_() override
Method inherited from AbstractWordSubstitutionModel.
virtual double getCodonsMulRate(size_t i, size_t j) const override
Method inherited from CodonSubstitutionModel.
Abstract Kronecker Word Model.
void setChangingPositions(const std::vector< std::set< size_t >> &vPos)
void addParameters_(const ParameterList ¶meters)
RowMatrix< double > generator_
The generator matrix of the model.
size_t getNumberOfStates() const override
Get the number of states.
std::vector< std::shared_ptr< SubstitutionModelInterface > > VSubMod_
std::vector< std::string > VnestedPrefix_
This class implements a state map where all resolved states are modeled.
virtual std::string getNamespace() const=0
virtual const ParameterList & getParameters() const=0
Map the states of a given alphabet which have a model state.
virtual bool enableEigenDecomposition()=0
Tell if eigenValues and Vectors must be computed.
Defines the basic types of data flow nodes.