40 #ifndef _ABSTRACTWORDSUBSTITUTIONMODEL_H_ 41 #define _ABSTRACTWORDSUBSTITUTIONMODEL_H_ 91 static Alphabet*
extractAlph(
const std::vector<SubstitutionModel*>& modelVector);
115 const std::vector<SubstitutionModel*>& modelVector,
116 const std::string& prefix);
131 const std::string& prefix);
157 return dynamic_cast<const SubstitutionModel*>(
VSubMod_[i]);
179 virtual void setFreq(std::map<int, double>& freqs);
183 #endif // ABSTRACTWORDSUBSTITUTIONMODEL_ Interface for all substitution models.
static Alphabet * extractAlph(const std::vector< SubstitutionModel *> &modelVector)
std::vector< double > Vrate_
virtual size_t getNumberOfStates() const
Get the number of states.
size_t getNumberOfModels() const
Partial implementation of the SubstitutionModel interface.
AbstractWordSubstitutionModel(const std::vector< SubstitutionModel *> &modelVector, const std::string &prefix)
Build a new AbstractWordSubstitutionModel object from a vector of pointers to SubstitutionModels.
Abstract Basal class for words of substitution models.
AbstractWordSubstitutionModel & operator=(const AbstractWordSubstitutionModel &)
virtual ~AbstractWordSubstitutionModel()
virtual void completeMatrices()=0
Called by updateMatrices to handle specific modifications for inheriting classes. ...
const SubstitutionModel * getNModel(size_t i) const
returns the ith model, or Null if i is not a valid number.
virtual void setFreq(std::map< int, double > &freqs)
Estimation of the parameters of the models so that the equilibrium frequencies match the given ones...
void setNamespace(const std::string &prefix)
void updateMatrices()
Diagonalize the matrix, and fill the eigenValues_, iEigenValues_, leftEigenVectors_ and rightEigenVe...
bool new_alphabet_
boolean flag to check if a specific WordAlphabet has been built
Map the states of a given alphabet which have a model state.
std::vector< std::string > VnestedPrefix_
std::vector< SubstitutionModel * > VSubMod_