bpp-phyl3
3.0.0
|
Sets a Register based on a matrix of integers. If M is the matrix, M[i,j] is the number of the substitution type from i to j, or 0 if there is no substitution type from i to j. More...
#include <Bpp/Phyl/Mapping/SubstitutionRegister.h>
Public Member Functions | |
GeneralSubstitutionRegister (std::shared_ptr< const StateMapInterface > stateMap) | |
GeneralSubstitutionRegister (std::shared_ptr< const StateMapInterface > stateMap, const RowMatrix< size_t > &matrix) | |
GeneralSubstitutionRegister (const GeneralSubstitutionRegister &gsr) | |
GeneralSubstitutionRegister & | operator= (const GeneralSubstitutionRegister &gsr) |
GeneralSubstitutionRegister * | clone () const override |
virtual | ~GeneralSubstitutionRegister () |
size_t | getType (size_t i, size_t j) const override |
Get the substitution type far a given pair of model states. More... | |
size_t | getNumberOfSubstitutionTypes () const override |
std::string | getTypeName (size_t type) const override |
names of the types are their number. 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 | |
void | updateTypes_ () |
Protected Attributes | |
size_t | size_ |
The size of the matrix, i.e. the number of states. More... | |
RowMatrix< size_t > | matrix_ |
The matrix of the substitution register. More... | |
std::map< size_t, std::map< size_t, std::vector< size_t > > > | types_ |
The map from substitution types to the map of from states to the vector of target states. More... | |
std::shared_ptr< const StateMapInterface > | stateMap_ |
std::string | name_ |
Sets a Register based on a matrix of integers. If M is the matrix, M[i,j] is the number of the substitution type from i to j, or 0 if there is no substitution type from i to j.
Definition at line 385 of file SubstitutionRegister.h.
|
inline |
Definition at line 408 of file SubstitutionRegister.h.
Referenced by clone().
|
inline |
Definition at line 415 of file SubstitutionRegister.h.
References bpp::RowMatrix< class >::getNumberOfColumns(), bpp::RowMatrix< class >::getNumberOfRows(), matrix_, size_, and updateTypes_().
|
inline |
Definition at line 428 of file SubstitutionRegister.h.
|
inlinevirtual |
Definition at line 449 of file SubstitutionRegister.h.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 133 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlineoverridevirtual |
Implements bpp::SubstitutionRegisterInterface.
Reimplemented in bpp::AAExteriorSubstitutionRegister, bpp::AAInteriorSubstitutionRegister, and bpp::SelectedSubstitutionRegister.
Definition at line 444 of file SubstitutionRegister.h.
References GeneralSubstitutionRegister().
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 135 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlineoverridevirtualinherited |
Get the name of the register.
Implements bpp::SubstitutionRegisterInterface.
Definition at line 137 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::name_.
|
inlineoverridevirtual |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 456 of file SubstitutionRegister.h.
References types_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 131 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlineoverridevirtual |
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.
Definition at line 451 of file SubstitutionRegister.h.
References matrix_.
|
inlineoverridevirtual |
names of the types are their number.
Implements bpp::SubstitutionRegisterInterface.
Reimplemented in bpp::AAExteriorSubstitutionRegister, bpp::AAInteriorSubstitutionRegister, and bpp::SelectedSubstitutionRegister.
Definition at line 464 of file SubstitutionRegister.h.
References bpp::TextTools::toString(), and types_.
|
inline |
Definition at line 435 of file SubstitutionRegister.h.
References matrix_, bpp::AbstractSubstitutionRegister::operator=(), size_, and types_.
Referenced by bpp::AAExteriorSubstitutionRegister::operator=(), and bpp::AAInteriorSubstitutionRegister::operator=().
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 129 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
Referenced by bpp::VectorOfSubstitutionRegisters::addRegister(), bpp::ComprehensiveSubstitutionRegister::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_().
|
protected |
Definition at line 10 of file SubstitutionRegister.cpp.
Referenced by bpp::AAExteriorSubstitutionRegister::AAExteriorSubstitutionRegister(), bpp::AAInteriorSubstitutionRegister::AAInteriorSubstitutionRegister(), GeneralSubstitutionRegister(), and bpp::SelectedSubstitutionRegister::SelectedSubstitutionRegister().
|
protected |
The matrix of the substitution register.
Definition at line 397 of file SubstitutionRegister.h.
Referenced by GeneralSubstitutionRegister(), getType(), operator=(), bpp::SelectedSubstitutionRegister::SelectedSubstitutionRegister(), bpp::AAInteriorSubstitutionRegister::updateMatrix_(), and bpp::AAExteriorSubstitutionRegister::updateMatrix_().
|
protectedinherited |
Definition at line 108 of file SubstitutionRegister.h.
Referenced by bpp::AbstractSubstitutionRegister::getName(), and bpp::AbstractSubstitutionRegister::operator=().
|
protected |
The size of the matrix, i.e. the number of states.
Definition at line 392 of file SubstitutionRegister.h.
Referenced by GeneralSubstitutionRegister(), and operator=().
|
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().
|
protected |
The map from substitution types to the map of from states to the vector of target states.
This is the reverse information of matrix_
Definition at line 405 of file SubstitutionRegister.h.
Referenced by getNumberOfSubstitutionTypes(), bpp::SelectedSubstitutionRegister::getTypeName(), bpp::AAInteriorSubstitutionRegister::getTypeName(), bpp::AAExteriorSubstitutionRegister::getTypeName(), getTypeName(), and operator=().