bpp-phyl
2.2.0
|
This class implements a state map where all resolved states are modeled. More...
#include <Bpp/Phyl/Model/StateMap.h>
Public Member Functions | |
CanonicalStateMap (const Alphabet *alphabet, bool includeGaps) | |
CanonicalStateMap (const StateMap &sm, bool includeGaps) | |
this contructors takes an existing StateMap and adds one model states for gaps. If the original StateMap alread had a state for gaps, a new one will be appended. More... | |
virtual CanonicalStateMap * | clone () const |
virtual const Alphabet * | getAlphabet () const |
virtual size_t | getNumberOfModelStates () const |
virtual const std::vector< int > & | getAlphabetStates () const |
virtual int | getAlphabetStateAsInt (size_t index) const |
virtual std::string | getAlphabetStateAsChar (size_t index) const |
virtual std::vector< size_t > | getModelStates (int code) const |
virtual std::vector< size_t > | getModelStates (const std::string &code) const |
Protected Attributes | |
const Alphabet * | alphabet_ |
std::vector< int > | states_ |
This class implements a state map where all resolved states are modeled.
For nucleotides, the underlying states are for instance: A (0), C (1), G (2), T/U (3). Optionally, gaps can be modeled.
Definition at line 161 of file StateMap.h.
CanonicalStateMap::CanonicalStateMap | ( | const Alphabet * | alphabet, |
bool | includeGaps | ||
) |
Definition at line 44 of file StateMap.cpp.
References bpp::AbstractStateMap::states_.
Referenced by clone().
CanonicalStateMap::CanonicalStateMap | ( | const StateMap & | sm, |
bool | includeGaps | ||
) |
this contructors takes an existing StateMap and adds one model states for gaps. If the original StateMap alread had a state for gaps, a new one will be appended.
Definition at line 54 of file StateMap.cpp.
References bpp::StateMap::getAlphabet(), bpp::StateMap::getAlphabetStateAsInt(), bpp::StateMap::getNumberOfModelStates(), and bpp::AbstractStateMap::states_.
|
inlinevirtual |
Implements bpp::StateMap.
Definition at line 173 of file StateMap.h.
References CanonicalStateMap().
|
inlinevirtualinherited |
Implements bpp::StateMap.
Definition at line 141 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_.
|
inlinevirtualinherited |
index | The model state. |
Implements bpp::StateMap.
Definition at line 145 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_, and bpp::AbstractStateMap::states_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getAlphabetStateAsChar().
|
inlinevirtualinherited |
index | The model state. |
Implements bpp::StateMap.
Definition at line 144 of file StateMap.h.
References bpp::AbstractStateMap::states_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getAlphabetStateAsInt().
|
inlinevirtualinherited |
Implements bpp::StateMap.
Definition at line 143 of file StateMap.h.
References bpp::AbstractStateMap::states_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getAlphabetStates().
|
inlinevirtualinherited |
code | The int code of the alphabet state to check. |
Implements bpp::StateMap.
Definition at line 146 of file StateMap.h.
References bpp::AbstractStateMap::states_.
Referenced by bpp::MarkovModulatedSubstitutionModel::getModelStates().
|
inlinevirtualinherited |
code | The character code of the alphabet state to check. |
Implements bpp::StateMap.
Definition at line 149 of file StateMap.h.
References bpp::AbstractStateMap::alphabet_, and bpp::AbstractStateMap::states_.
|
inlinevirtualinherited |
Implements bpp::StateMap.
Definition at line 142 of file StateMap.h.
References bpp::AbstractStateMap::states_.
|
protectedinherited |
Definition at line 119 of file StateMap.h.
Referenced by bpp::AbstractStateMap::getAlphabet(), bpp::AbstractStateMap::getAlphabetStateAsChar(), bpp::AbstractStateMap::getModelStates(), and bpp::AbstractStateMap::operator=().
|
protectedinherited |
Definition at line 120 of file StateMap.h.
Referenced by CanonicalStateMap(), bpp::AbstractStateMap::getAlphabetStateAsChar(), bpp::AbstractStateMap::getAlphabetStateAsInt(), bpp::AbstractStateMap::getAlphabetStates(), bpp::AbstractStateMap::getModelStates(), bpp::AbstractStateMap::getNumberOfModelStates(), bpp::MarkovModulatedStateMap::MarkovModulatedStateMap(), and bpp::AbstractStateMap::operator=().