bpp-phyl
2.2.0
|
Distinguishes all types of substitutions. More...
#include <Bpp/Phyl/Mapping/SubstitutionRegister.h>
Public Member Functions | |
ComprehensiveSubstitutionRegister (const SubstitutionModel *model, bool within=false) | |
ComprehensiveSubstitutionRegister * | clone () const |
virtual size_t | getCategory (size_t state) const |
virtual size_t | getCategoryFrom (size_t type) const |
virtual size_t | getCategoryTo (size_t type) const |
virtual std::string | getCategoryName (size_t category) const |
virtual bool | allowWithin () const |
size_t | getNumberOfCategories () const |
size_t | getNumberOfSubstitutionTypes () const |
virtual size_t | getType (size_t fromState, size_t toState) const |
Get the substitution type far a given pair of model states. More... | |
std::string | getTypeName (size_t type) const |
Get the name of a given substitution type. More... | |
const SubstitutionModel * | getSubstitutionModel () const |
const Alphabet * | getAlphabet () const |
Protected Member Functions | |
template<class T > | |
void | setCategories (const std::map< int, T > &categories) |
Protected Attributes | |
bool | within_ |
size_t | nbCategories_ |
std::map< int, size_t > | categories_ |
std::vector< std::string > | categoryNames_ |
std::vector< std::vector< size_t > > | index_ |
std::vector< std::vector< size_t > > | revIndex_ |
const SubstitutionModel * | model_ |
Distinguishes all types of substitutions.
This register has all n * (n-1) substitution type, where n is the size of the alphabet, mapped as:
Definition at line 448 of file SubstitutionRegister.h.
|
inline |
Definition at line 452 of file SubstitutionRegister.h.
References bpp::SubstitutionModel::getAlphabet().
Referenced by clone().
|
inlinevirtualinherited |
Definition at line 289 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::within_.
|
inlinevirtual |
Implements bpp::SubstitutionRegister.
Definition at line 463 of file SubstitutionRegister.h.
References ComprehensiveSubstitutionRegister().
|
inlinevirtualinherited |
Implements bpp::SubstitutionRegister.
Definition at line 147 of file SubstitutionRegister.h.
References bpp::SubstitutionModel::getAlphabet(), and bpp::AbstractSubstitutionRegister::model_.
|
inlinevirtualinherited |
Definition at line 248 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_, bpp::SubstitutionModel::getAlphabetStateAsInt(), and bpp::AbstractSubstitutionRegister::model_.
Referenced by bpp::SubstitutionMappingTools::getRelativeCountsPerBranch().
|
inlinevirtualinherited |
Definition at line 254 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, and bpp::CategorySubstitutionRegister::within_.
Referenced by bpp::SubstitutionMappingTools::getRelativeCountsPerBranch(), and bpp::CategorySubstitutionRegister::getTypeName().
|
inlinevirtualinherited |
Definition at line 284 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categoryNames_.
Referenced by bpp::CategorySubstitutionRegister::getTypeName().
|
inlinevirtualinherited |
Definition at line 269 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, and bpp::CategorySubstitutionRegister::within_.
Referenced by bpp::CategorySubstitutionRegister::getTypeName().
|
inlineinherited |
Definition at line 291 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_.
Referenced by bpp::SubstitutionMappingTools::getRelativeCountsPerBranch().
|
inlinevirtualinherited |
Implements bpp::SubstitutionRegister.
Reimplemented in bpp::GCSynonymousSubstitutionRegister.
Definition at line 293 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, and bpp::CategorySubstitutionRegister::within_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionRegister.
Definition at line 145 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::model_.
|
inlinevirtualinherited |
Get the substitution type far a given pair of model states.
fromState | Initial state (should be a state supported by the specified alphabet). |
toState | Final state (should be a state supported by the specified alphabet). |
Implements bpp::SubstitutionRegister.
Reimplemented in bpp::GCSynonymousSubstitutionRegister.
Definition at line 295 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_, bpp::SubstitutionModel::getAlphabetStateAsInt(), bpp::CategorySubstitutionRegister::index_, and bpp::AbstractSubstitutionRegister::model_.
|
inlinevirtualinherited |
Get the name of a given substitution type.
This method is only used for user-friendlyness purposes, not computational goal. I can therefore be left unimplemented in some cases.
type | Index of the substitution (should be an size_t contained in the register). |
Implements bpp::SubstitutionRegister.
Reimplemented in bpp::GCSynonymousSubstitutionRegister.
Definition at line 305 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryName(), and bpp::CategorySubstitutionRegister::getCategoryTo().
|
inlineprotectedinherited |
Definition at line 185 of file SubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_, bpp::CategorySubstitutionRegister::categoryNames_, bpp::SubstitutionModel::getAlphabet(), bpp::SubstitutionModel::getAlphabetStates(), bpp::CategorySubstitutionRegister::index_, bpp::AbstractSubstitutionRegister::model_, bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, and bpp::CategorySubstitutionRegister::within_.
|
mutableprotectedinherited |
Definition at line 161 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategory(), bpp::CategorySubstitutionRegister::getType(), bpp::GCSynonymousSubstitutionRegister::getType(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 162 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryName(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 163 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getType(), bpp::GCSynonymousSubstitutionRegister::getType(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 125 of file SubstitutionRegister.h.
Referenced by bpp::AbstractSubstitutionRegister::getAlphabet(), bpp::CategorySubstitutionRegister::getCategory(), bpp::AbstractSubstitutionRegister::getSubstitutionModel(), bpp::CategorySubstitutionRegister::getType(), bpp::TsTvSubstitutionRegister::getType(), bpp::DnDsSubstitutionRegister::getType(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::AbstractSubstitutionRegister::operator=(), bpp::SelectedSubstitutionRegister::SelectedSubstitutionRegister(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 160 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), bpp::CategorySubstitutionRegister::getNumberOfCategories(), bpp::CategorySubstitutionRegister::getNumberOfSubstitutionTypes(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 164 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), and bpp::CategorySubstitutionRegister::setCategories().
|
protectedinherited |
Definition at line 159 of file SubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::allowWithin(), bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), bpp::CategorySubstitutionRegister::getNumberOfSubstitutionTypes(), and bpp::CategorySubstitutionRegister::setCategories().