|
bpp-phyl3 3.0.0
|
The CategorySubstitutionRegisters. More...
#include <Bpp/Phyl/Mapping/CategorySubstitutionRegister.h>
Inheritance diagram for bpp::CategorySubstitutionRegister:
Collaboration diagram for bpp::CategorySubstitutionRegister:Public Member Functions | |
| CategorySubstitutionRegister (std::shared_ptr< const StateMapInterface > stateMap, bool within=false) | |
| Build a new substitution register with categories. This class is meant to be inherited. More... | |
| 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... | |
| virtual SubstitutionRegisterInterface * | clone () const =0 |
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_ |
The CategorySubstitutionRegisters.
Gather states into defined categories, and count the changes between categories.
Optionally allows for within categories substitutions.
Definition at line 25 of file CategorySubstitutionRegister.h.
|
inline |
Build a new substitution register with categories. This class is meant to be inherited.
| stateMap | The stateMap defining the states. |
| within | Specifies if within categories substitutions should be counted as well. |
Definition at line 45 of file CategorySubstitutionRegister.h.
|
inlinevirtual |
Definition at line 177 of file CategorySubstitutionRegister.h.
References within_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 133 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
pure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::ComprehensiveSubstitutionRegister, bpp::GCSubstitutionRegister, bpp::GCSynonymousSubstitutionRegister, bpp::GCPositionSubstitutionRegister, bpp::SelectedSubstitutionRegister, bpp::AAInteriorSubstitutionRegister, bpp::AAExteriorSubstitutionRegister, bpp::TsTvSubstitutionRegister, bpp::SWSubstitutionRegister, bpp::DnDsSubstitutionRegister, bpp::KrKcSubstitutionRegister, bpp::TotalSubstitutionRegister, bpp::CompleteSubstitutionRegister, bpp::VectorOfSubstitutionRegisters, and bpp::GeneralSubstitutionRegister.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 135 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlinevirtual |
Definition at line 137 of file CategorySubstitutionRegister.h.
References categories_.
|
inlinevirtual |
Definition at line 142 of file CategorySubstitutionRegister.h.
References nbCategories_, revIndex_, and within_.
Referenced by getTypeName().
|
inlinevirtual |
Definition at line 172 of file CategorySubstitutionRegister.h.
References categoryNames_.
Referenced by getTypeName().
|
inlinevirtual |
Definition at line 157 of file CategorySubstitutionRegister.h.
References nbCategories_, revIndex_, and within_.
Referenced by getTypeName().
|
inlineoverridevirtualinherited |
Get the name of the register.
Implements bpp::SubstitutionRegisterInterface.
Definition at line 137 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::name_.
|
inline |
Definition at line 189 of file CategorySubstitutionRegister.h.
References nbCategories_.
|
inlinevirtual |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 191 of file CategorySubstitutionRegister.h.
References nbCategories_, and within_.
|
inlineoverridevirtualinherited |
Implements bpp::SubstitutionRegisterInterface.
Definition at line 131 of file SubstitutionRegister.h.
References bpp::AbstractSubstitutionRegister::stateMap_.
|
inlinevirtual |
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::GCSynonymousSubstitutionRegister, and bpp::GCPositionSubstitutionRegister.
Definition at line 193 of file CategorySubstitutionRegister.h.
References categories_, and index_.
|
inlinevirtual |
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::GCSynonymousSubstitutionRegister, and bpp::GCPositionSubstitutionRegister.
Definition at line 203 of file CategorySubstitutionRegister.h.
References getCategoryFrom(), getCategoryName(), and getCategoryTo().
|
inline |
Definition at line 179 of file CategorySubstitutionRegister.h.
References stationarity_.
|
inlineprotected |
Definition at line 58 of file CategorySubstitutionRegister.h.
References bpp::StateMapInterface::getModelStates(), and bpp::AbstractSubstitutionRegister::stateMap().
|
inlineprotected |
Definition at line 75 of file CategorySubstitutionRegister.h.
References categories_, categoryNames_, count(), bpp::StateMapInterface::getNumberOfModelStates(), bpp::StateMapInterface::getStateDescription(), index_, nbCategories_, revIndex_, bpp::AbstractSubstitutionRegister::stateMap(), and within_.
|
inline |
Definition at line 184 of file CategorySubstitutionRegister.h.
References 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(), bpp::ComprehensiveSubstitutionRegister::ComprehensiveSubstitutionRegister(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::GCPositionSubstitutionRegister::getType(), bpp::TsTvSubstitutionRegister::getType(), bpp::SWSubstitutionRegister::getType(), bpp::DnDsSubstitutionRegister::getType(), bpp::KrKcSubstitutionRegister::getType(), bpp::SelectedSubstitutionRegister::SelectedSubstitutionRegister(), setAlphabetCategories(), setModelCategories(), bpp::AAInteriorSubstitutionRegister::updateMatrix_(), and bpp::AAExteriorSubstitutionRegister::updateMatrix_().
|
mutableprotected |
Definition at line 31 of file CategorySubstitutionRegister.h.
Referenced by getCategory(), getType(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::GCPositionSubstitutionRegister::getType(), and setModelCategories().
|
protected |
Definition at line 32 of file CategorySubstitutionRegister.h.
Referenced by getCategoryName(), and setModelCategories().
|
protected |
Definition at line 33 of file CategorySubstitutionRegister.h.
Referenced by getType(), bpp::GCSynonymousSubstitutionRegister::getType(), bpp::GCPositionSubstitutionRegister::getType(), and setModelCategories().
|
protectedinherited |
Definition at line 108 of file SubstitutionRegister.h.
Referenced by bpp::AbstractSubstitutionRegister::getName(), and bpp::AbstractSubstitutionRegister::operator=().
|
protected |
Definition at line 30 of file CategorySubstitutionRegister.h.
Referenced by getCategoryFrom(), getCategoryTo(), getNumberOfCategories(), getNumberOfSubstitutionTypes(), and setModelCategories().
|
protected |
Definition at line 34 of file CategorySubstitutionRegister.h.
Referenced by getCategoryFrom(), getCategoryTo(), and 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().
|
protected |
Definition at line 36 of file CategorySubstitutionRegister.h.
Referenced by isStationary(), and setStationarity().
|
protected |
Definition at line 29 of file CategorySubstitutionRegister.h.
Referenced by allowWithin(), getCategoryFrom(), getCategoryTo(), getNumberOfSubstitutionTypes(), and setModelCategories().