bpp-phyl3
3.0.0
|
A convenience partial implementation of the StateMap interface. More...
#include <Bpp/Phyl/Model/StateMap.h>
Public Member Functions | |
AbstractStateMap (std::shared_ptr< const Alphabet > alphabet) | |
AbstractStateMap (const AbstractStateMap &absm) | |
AbstractStateMap & | operator= (const AbstractStateMap &absm) |
const Alphabet & | alphabet () const override |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
size_t | getNumberOfModelStates () const override |
const std::vector< int > & | getAlphabetStates () const override |
int | getAlphabetStateAsInt (size_t index) const override |
std::string | getAlphabetStateAsChar (size_t index) const override |
std::vector< size_t > | getModelStates (int code) const override |
std::vector< size_t > | getModelStates (const std::string &code) const override |
bool | operator== (const StateMapInterface &sm) const override |
Comparison operator==. More... | |
bool | operator!= (const StateMapInterface &sm) const override |
Comparison operator!=. More... | |
virtual StateMapInterface * | clone () const override=0 |
virtual std::string | getStateDescription (size_t index) const =0 |
Protected Attributes | |
std::shared_ptr< const Alphabet > | alphabet_ |
std::vector< int > | states_ |
A convenience partial implementation of the StateMap interface.
Model states are stored as their corresponding int codes, stored in a vector 'states_'. This vector has to be initialized and filled by the derived class.
Definition at line 104 of file StateMap.h.
|
inline |
Definition at line 112 of file StateMap.h.
|
inline |
Definition at line 117 of file StateMap.h.
|
inlineoverridevirtual |
Implements bpp::StateMapInterface.
Definition at line 130 of file StateMap.h.
References alphabet_.
Referenced by bpp::CanonicalStateMap::CanonicalStateMap().
|
overridepure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::MarkovModulatedStateMap, and bpp::CanonicalStateMap.
|
inlineoverridevirtual |
Implements bpp::StateMapInterface.
Definition at line 131 of file StateMap.h.
References alphabet_.
|
inlineoverridevirtual |
index | The model state. |
Implements bpp::StateMapInterface.
Definition at line 135 of file StateMap.h.
References alphabet_, and states_.
Referenced by bpp::CanonicalStateMap::getStateDescription(), and bpp::MarkovModulatedStateMap::getStateDescription().
|
inlineoverridevirtual |
index | The model state. |
Implements bpp::StateMapInterface.
Definition at line 134 of file StateMap.h.
References states_.
|
inlineoverridevirtual |
Implements bpp::StateMapInterface.
Definition at line 133 of file StateMap.h.
References states_.
|
inlineoverridevirtual |
code | The character code of the alphabet state to check. |
Implements bpp::StateMapInterface.
Definition at line 140 of file StateMap.h.
References alphabet_, states_, and bpp::VectorTools::whichAll().
|
inlineoverridevirtual |
code | The int code of the alphabet state to check. |
Implements bpp::StateMapInterface.
Definition at line 136 of file StateMap.h.
References states_, and bpp::VectorTools::whichAll().
|
inlineoverridevirtual |
Implements bpp::StateMapInterface.
Definition at line 132 of file StateMap.h.
References states_.
|
pure virtualinherited |
index | The state index. |
Implemented in bpp::MarkovModulatedStateMap, and bpp::CanonicalStateMap.
Referenced by bpp::CategorySubstitutionRegister::setModelCategories().
|
inlineoverridevirtual |
Comparison operator!=.
Two StateMaps are not identical if they do not share the same alphabet or states.
Implements bpp::StateMapInterface.
Definition at line 152 of file StateMap.h.
References bpp::StateMapInterface::alphabet(), alphabet_, bpp::StateMapInterface::getAlphabetStates(), bpp::Alphabet::getAlphabetType(), and states_.
|
inline |
Definition at line 122 of file StateMap.h.
|
inlineoverridevirtual |
Comparison operator==.
Two StateMaps are identical if they share the same alphabet and states.
Implements bpp::StateMapInterface.
Definition at line 145 of file StateMap.h.
References bpp::StateMapInterface::alphabet(), alphabet_, bpp::StateMapInterface::getAlphabetStates(), bpp::Alphabet::getAlphabetType(), and states_.
|
protected |
Definition at line 108 of file StateMap.h.
Referenced by alphabet(), getAlphabet(), getAlphabetStateAsChar(), getModelStates(), operator!=(), operator=(), and operator==().
|
protected |
Definition at line 109 of file StateMap.h.
Referenced by bpp::CanonicalStateMap::CanonicalStateMap(), getAlphabetStateAsChar(), getAlphabetStateAsInt(), getAlphabetStates(), getModelStates(), getNumberOfModelStates(), bpp::MarkovModulatedStateMap::MarkovModulatedStateMap(), operator!=(), operator=(), and operator==().