41 #include <Bpp/Numeric/VectorTools.h> 42 #include <Bpp/Numeric/Matrix/MatrixTools.h> 43 #include <Bpp/Numeric/Matrix/EigenValue.h> 46 #include <Bpp/Seq/Alphabet/WordAlphabet.h> 47 #include <Bpp/Seq/Container/SequenceContainerTools.h> 59 const CodonAlphabet* palph,
61 AbstractParameterAliasable(
"Triplet."),
65 addParameters_(pmod->getParameters());
68 for (i = 0; i < 3; i++)
76 for (i = 0; i < 2; i++)
78 addParameter_(
new Parameter(
"Triplet.relrate" + TextTools::toString(i+1), 1.0 / (3 - i), &Parameter::PROP_CONSTRAINT_EX));
85 const CodonAlphabet* palph,
89 AbstractParameterAliasable(
"Triplet."),
92 string st =
"Triplet.";
94 if ((pmod1 == pmod2) || (pmod2 == pmod3) || (pmod1 == pmod3))
97 for (i = 0; i < 3; i++)
104 addParameters_(pmod1->getParameters());
111 addParameters_(pmod1->getParameters());
116 addParameters_(pmod2->getParameters());
121 addParameters_(pmod3->getParameters());
126 for (i = 0; i < 3; i++)
132 for (i = 0; i < 2; i++)
134 addParameter_(
new Parameter(st +
"relrate" + TextTools::toString(i+1), 1.0 / (3 - i),&Parameter::PROP_CONSTRAINT_EX));
142 string s =
"TripletSubstitutionModel model:";
143 for (
unsigned int i = 0; i <
VSubMod_.size(); i++)
This class implements a state map where all resolved states are modeled.
std::string getName() const
Get the name of the model.
std::vector< double > Vrate_
Specialisation interface for nucleotide substitution model.
Basal class for words of reversible substitution models.
virtual void updateMatrices()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
TripletSubstitutionModel(const CodonAlphabet *palph, NucleotideSubstitutionModel *pmod)
Build a new TripletSubstitutionModel object from a pointer to a NucleotideSubstitutionModel.
std::vector< std::string > VnestedPrefix_
std::vector< SubstitutionModel * > VSubMod_