49 const Alphabet* alpha,
StateMap* stateMap,
const std::string& prefix) :
50 AbstractParameterAliasable(prefix),
56 for (
unsigned int i = 0; i <
size_; i++)
58 for (
unsigned int j = 0; j <
size_; j++)
71 AbstractParameterAliasable(msm),
87 AbstractParameterAliasable::operator=(model);
120 vector<const Matrix<double>* > vM;
137 pijt_(i, j) = x / sP;
146 vector<const Matrix<double>* > vM;
172 vector<const Matrix<double>* > vM;
219 throw Exception(
"AbstractMixedSubstitutionModel::setVRates bad size of Vdouble argument.");
221 for (
unsigned int i = 0; i < vd.size(); i++)
233 for (
unsigned int i = 0; i <
vRates_.size(); i++)
240 for (
unsigned int i = 0; i <
vRates_.size(); i++)
virtual const Matrix< double > & getd2Pij_dt2(double t) const
RowMatrix< double > exchangeability_
The exchangeability matrix of the model, defined as . When the model is reversible, this matrix is symetric.
RowMatrix< double > d2pijt_
RowMatrix< double > pijt_
These ones are for bookkeeping:
RowMatrix< double > rightEigenVectors_
The matrix made of right eigen vectors (by column).
Vdouble eigenValues_
The vector of eigen values.
virtual void setVRates(const Vdouble &vd)
Sets the rates of the submodels to be proportional to a given vector, with the constraint that the me...
virtual void normalizeVRates()
Normalizes the rates of the submodels so that the mean rate of the mixture equals rate_...
AbstractSubstitutionModel & operator=(const AbstractSubstitutionModel &model)
Partial implementation of the SubstitutionModel interface.
Partial implementation for Mixed Substitution models, defined as a mixture of "simple" substitution m...
virtual const Matrix< double > & getdPij_dt(double t) const
virtual const Matrix< double > & getPij_t(double t) const
AbstractMixedSubstitutionModel & operator=(const AbstractMixedSubstitutionModel &)
bool eigenDecompose_
Tell if the eigen decomposition should be performed.
RowMatrix< double > leftEigenVectors_
The matrix made of left eigen vectors (by row) if rightEigenVectors_ is non-singular.
RowMatrix< double > generator_
The generator matrix of the model.
double rate_
The rate of the model (default: 1). The generator (and all its vectorial components) is independent o...
virtual void setRate(double rate)
Set the rate of the model and the submodels.
virtual void setRate(double rate)
Set the rate of the model (must be positive).
std::vector< double > vRates_
vector of the rates of the models.
RowMatrix< double > dpijt_
size_t size_
The size of the generator, i.e. the number of states.
AbstractMixedSubstitutionModel(const Alphabet *, StateMap *stateMap, const std::string &prefix)
Map the states of a given alphabet which have a model state.
virtual size_t getNumberOfStates() const
From SubstitutionModel interface.
std::vector< SubstitutionModel * > modelsContainer_
vector of pointers to SubstitutionModels.
std::vector< double > vProbas_
vector of the probabilities of the models
virtual ~AbstractMixedSubstitutionModel()