bpp-phyl3
3.0.0
|
This class implements a state map for Markov modulated models. More...
#include <Bpp/Phyl/Model/StateMap.h>
Public Member Functions | |
MarkovModulatedStateMap (const StateMapInterface &unitMap, unsigned int nbClasses) | |
virtual MarkovModulatedStateMap * | clone () const |
virtual std::string | getStateDescription (size_t index) const |
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... | |
Protected Attributes | |
std::shared_ptr< const Alphabet > | alphabet_ |
std::vector< int > | states_ |
Private Attributes | |
unsigned int | nbClasses_ |
This class implements a state map for Markov modulated models.
For nucleotides with two classes, the underlying states are for instance: A (0), C (1), G (2), T/U (3), A (4), C (5), G (6), T/U (7).
Definition at line 190 of file StateMap.h.
MarkovModulatedStateMap::MarkovModulatedStateMap | ( | const StateMapInterface & | unitMap, |
unsigned int | nbClasses | ||
) |
Definition at line 36 of file StateMap.cpp.
References bpp::StateMapInterface::getAlphabetStateAsInt(), bpp::StateMapInterface::getNumberOfModelStates(), and bpp::AbstractStateMap::states_.
Referenced by clone().
|
inlineoverridevirtualinherited |
Implements bpp::StateMapInterface.
Definition at line 130 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_.
Referenced by bpp::CanonicalStateMap::CanonicalStateMap().
|
inlinevirtual |
Implements bpp::StateMapInterface.
Definition at line 198 of file StateMap.h.
References MarkovModulatedStateMap().
|
inlineoverridevirtualinherited |
Implements bpp::StateMapInterface.
Definition at line 131 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_.
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::StateMapInterface.
Definition at line 135 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_, and bpp::AbstractStateMap::states_.
Referenced by bpp::CanonicalStateMap::getStateDescription(), and getStateDescription().
|
inlineoverridevirtualinherited |
index | The model state. |
Implements bpp::StateMapInterface.
Definition at line 134 of file StateMap.h.
References bpp::AbstractStateMap::states_.
|
inlineoverridevirtualinherited |
Implements bpp::StateMapInterface.
Definition at line 133 of file StateMap.h.
References bpp::AbstractStateMap::states_.
|
inlineoverridevirtualinherited |
code | The character code of the alphabet state to check. |
Implements bpp::StateMapInterface.
Definition at line 140 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_, bpp::AbstractStateMap::states_, and bpp::VectorTools::whichAll().
|
inlineoverridevirtualinherited |
code | The int code of the alphabet state to check. |
Implements bpp::StateMapInterface.
Definition at line 136 of file StateMap.h.
References bpp::AbstractStateMap::states_, and bpp::VectorTools::whichAll().
|
inlineoverridevirtualinherited |
Implements bpp::StateMapInterface.
Definition at line 132 of file StateMap.h.
References bpp::AbstractStateMap::states_.
|
inlinevirtual |
index | The state index. |
Implements bpp::StateMapInterface.
Definition at line 200 of file StateMap.h.
References bpp::AbstractStateMap::getAlphabetStateAsChar(), nbClasses_, and bpp::TextTools::toString().
|
inlineoverridevirtualinherited |
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(), bpp::AbstractStateMap::alphabet_, bpp::StateMapInterface::getAlphabetStates(), bpp::Alphabet::getAlphabetType(), and bpp::AbstractStateMap::states_.
|
inlineoverridevirtualinherited |
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(), bpp::AbstractStateMap::alphabet_, bpp::StateMapInterface::getAlphabetStates(), bpp::Alphabet::getAlphabetType(), and bpp::AbstractStateMap::states_.
|
protectedinherited |
Definition at line 108 of file StateMap.h.
Referenced by bpp::AbstractStateMap::alphabet(), bpp::AbstractStateMap::getAlphabet(), bpp::AbstractStateMap::getAlphabetStateAsChar(), bpp::AbstractStateMap::getModelStates(), bpp::AbstractStateMap::operator!=(), bpp::AbstractStateMap::operator=(), and bpp::AbstractStateMap::operator==().
|
private |
Definition at line 194 of file StateMap.h.
Referenced by getStateDescription().
|
protectedinherited |
Definition at line 109 of file StateMap.h.
Referenced by bpp::CanonicalStateMap::CanonicalStateMap(), bpp::AbstractStateMap::getAlphabetStateAsChar(), bpp::AbstractStateMap::getAlphabetStateAsInt(), bpp::AbstractStateMap::getAlphabetStates(), bpp::AbstractStateMap::getModelStates(), bpp::AbstractStateMap::getNumberOfModelStates(), MarkovModulatedStateMap(), bpp::AbstractStateMap::operator!=(), bpp::AbstractStateMap::operator=(), and bpp::AbstractStateMap::operator==().