bpp-phyl3
3.0.0
|
Distinguishes all types of substitutions. More...
#include <Bpp/Phyl/Mapping/CategorySubstitutionRegister.h>
Public Member Functions | |
ComprehensiveSubstitutionRegister (std::shared_ptr< const StateMapInterface > stateMap, 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 |
bool | isStationary () const |
void | setStationarity (bool stat) |
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 StateMapInterface & | stateMap () const override |
std::shared_ptr< const StateMapInterface > | getStateMap () const override |
const Alphabet & | alphabet () const override |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
const std::string & | getName () const override |
Get the name of the register. More... | |
Protected Member Functions | |
template<class T > | |
void | setAlphabetCategories (const std::map< int, T > &categories) |
template<class T > | |
void | setModelCategories (const std::map< size_t, T > &categories) |
Protected Attributes | |
bool | within_ |
size_t | nbCategories_ |
std::map< size_t, size_t > | categories_ |
std::vector< std::string > | categoryNames_ |
std::vector< std::vector< size_t > > | index_ |
std::vector< std::vector< size_t > > | revIndex_ |
bool | stationarity_ |
std::shared_ptr< const StateMapInterface > | stateMap_ |
std::string | name_ |
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 217 of file CategorySubstitutionRegister.h.
|
inline |
Definition at line 221 of file CategorySubstitutionRegister.h.
References bpp::StateMapInterface::getNumberOfModelStates(), and bpp::AbstractSubstitutionRegister::stateMap().
Referenced by clone().
|
inlinevirtualinherited |
Definition at line 177 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::within_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 133 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlinevirtual |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 232 of file CategorySubstitutionRegister.h.
References ComprehensiveSubstitutionRegister().
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 135 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlinevirtualinherited |
Definition at line 137 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_.
|
inlinevirtualinherited |
Definition at line 142 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, and bpp::CategorySubstitutionRegister::within_.
Referenced by bpp::CategorySubstitutionRegister::getTypeName().
|
inlinevirtualinherited |
Definition at line 172 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categoryNames_.
Referenced by bpp::CategorySubstitutionRegister::getTypeName().
|
inlinevirtualinherited |
Definition at line 157 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, and bpp::CategorySubstitutionRegister::within_.
Referenced by bpp::CategorySubstitutionRegister::getTypeName().
|
inlineoverridevirtualinherited |
Get the name of the register.
Implements bpp::SubstitutionRegisterInterface.
Definition at line 137 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::name_.
|
inlineinherited |
Definition at line 189 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_.
|
inlinevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 191 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::nbCategories_, and bpp::CategorySubstitutionRegister::within_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 131 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
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::SubstitutionRegisterInterface.
Reimplemented in bpp::GCPositionSubstitutionRegister, and bpp::GCSynonymousSubstitutionRegister.
Definition at line 193 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_, and bpp::CategorySubstitutionRegister::index_.
|
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::SubstitutionRegisterInterface.
Reimplemented in bpp::GCPositionSubstitutionRegister, and bpp::GCSynonymousSubstitutionRegister.
Definition at line 203 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryName(), and bpp::CategorySubstitutionRegister::getCategoryTo().
|
inlineinherited |
Definition at line 179 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::stationarity_.
|
inlineprotectedinherited |
Definition at line 58 of file CategorySubstitutionRegister.h.
References bpp::StateMapInterface::getModelStates(), and bpp::AbstractSubstitutionRegister::stateMap().
|
inlineprotectedinherited |
Definition at line 75 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::categories_, bpp::CategorySubstitutionRegister::categoryNames_, count(), bpp::StateMapInterface::getNumberOfModelStates(), bpp::StateMapInterface::getStateDescription(), bpp::CategorySubstitutionRegister::index_, bpp::CategorySubstitutionRegister::nbCategories_, bpp::CategorySubstitutionRegister::revIndex_, bpp::AbstractSubstitutionRegister::stateMap(), and bpp::CategorySubstitutionRegister::within_.
|
inlineinherited |
Definition at line 184 of file CategorySubstitutionRegister.h.
References bpp::CategorySubstitutionRegister::stationarity_.
Referenced by bpp::PhylogeneticsApplicationTools::getSubstitutionRegister().
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 129 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
Referenced by bpp::VectorOfSubstitutionRegisters::addRegister(), ComprehensiveSubstitutionRegister(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::GCPositionSubstitutionRegister::getType(), bpp::TsTvSubstitutionRegister::getType(), bpp::SWSubstitutionRegister::getType(), bpp::DnDsSubstitutionRegister::getType(), bpp::KrKcSubstitutionRegister::getType(), bpp::SelectedSubstitutionRegister::SelectedSubstitutionRegister(), bpp::CategorySubstitutionRegister::setAlphabetCategories(), bpp::CategorySubstitutionRegister::setModelCategories(), bpp::AAInteriorSubstitutionRegister::updateMatrix_(), and bpp::AAExteriorSubstitutionRegister::updateMatrix_().
|
mutableprotectedinherited |
Definition at line 31 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategory(), bpp::CategorySubstitutionRegister::getType(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::GCPositionSubstitutionRegister::getType(), and bpp::CategorySubstitutionRegister::setModelCategories().
|
protectedinherited |
Definition at line 32 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryName(), and bpp::CategorySubstitutionRegister::setModelCategories().
|
protectedinherited |
|
protectedinherited |
Definition at line 108 of file SubstitutionRegister.h.
Referenced by bpp::AbstractSubstitutionRegister::getName(), and bpp::AbstractSubstitutionRegister::operator=().
|
protectedinherited |
Definition at line 30 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), bpp::CategorySubstitutionRegister::getNumberOfCategories(), bpp::CategorySubstitutionRegister::getNumberOfSubstitutionTypes(), and bpp::CategorySubstitutionRegister::setModelCategories().
|
protectedinherited |
Definition at line 34 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), and bpp::CategorySubstitutionRegister::setModelCategories().
|
protectedinherited |
Definition at line 107 of file SubstitutionRegister.h.
Referenced by bpp::AbstractSubstitutionRegister::alphabet(), bpp::AbstractSubstitutionRegister::getAlphabet(), bpp::AbstractSubstitutionRegister::getStateMap(), bpp::AbstractSubstitutionRegister::operator=(), and bpp::AbstractSubstitutionRegister::stateMap().
|
protectedinherited |
Definition at line 36 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::isStationary(), and bpp::CategorySubstitutionRegister::setStationarity().
|
protectedinherited |
Definition at line 29 of file CategorySubstitutionRegister.h.
Referenced by bpp::CategorySubstitutionRegister::allowWithin(), bpp::CategorySubstitutionRegister::getCategoryFrom(), bpp::CategorySubstitutionRegister::getCategoryTo(), bpp::CategorySubstitutionRegister::getNumberOfSubstitutionTypes(), and bpp::CategorySubstitutionRegister::setModelCategories().