bpp-phyl  2.2.0
bpp::StateMap Class Referenceabstract

Map the states of a given alphabet which have a model state. More...

#include <Bpp/Phyl/Model/StateMap.h>

+ Inheritance diagram for bpp::StateMap:
+ Collaboration diagram for bpp::StateMap:

Public Member Functions

virtual ~StateMap ()
 
virtual StateMapclone () const =0
 
virtual const Alphabet * getAlphabet () const =0
 
virtual size_t getNumberOfModelStates () const =0
 
virtual const std::vector< int > & getAlphabetStates () const =0
 
virtual std::string getAlphabetStateAsChar (size_t index) const =0
 
virtual int getAlphabetStateAsInt (size_t index) const =0
 
virtual std::vector< size_t > getModelStates (const std::string &code) const =0
 
virtual std::vector< size_t > getModelStates (int code) const =0
 

Detailed Description

Map the states of a given alphabet which have a model state.

Definition at line 58 of file StateMap.h.

Constructor & Destructor Documentation

◆ ~StateMap()

virtual bpp::StateMap::~StateMap ( )
inlinevirtual

Definition at line 62 of file StateMap.h.

Member Function Documentation

◆ clone()

◆ getAlphabet()

virtual const Alphabet* bpp::StateMap::getAlphabet ( ) const
pure virtual
Returns
The associated alphabet.

Implemented in bpp::AbstractStateMap.

Referenced by bpp::CanonicalStateMap::CanonicalStateMap().

◆ getAlphabetStateAsChar()

virtual std::string bpp::StateMap::getAlphabetStateAsChar ( size_t  index) const
pure virtual
Parameters
indexThe model state.
Returns
The corresponding alphabet state as character code.

Implemented in bpp::AbstractStateMap.

◆ getAlphabetStateAsInt()

virtual int bpp::StateMap::getAlphabetStateAsInt ( size_t  index) const
pure virtual

◆ getAlphabetStates()

virtual const std::vector<int>& bpp::StateMap::getAlphabetStates ( ) const
pure virtual
Returns
A vector with the corresponding alphabet states for each model state. the size of the vector is the number of model states, not the number of supported alphabet states, as distinct model states can correspond to a single alphabet state.

Implemented in bpp::AbstractStateMap.

◆ getModelStates() [1/2]

virtual std::vector<size_t> bpp::StateMap::getModelStates ( const std::string &  code) const
pure virtual
Parameters
codeThe character code of the alphabet state to check.
Returns
The corresponding model states, is any.

Implemented in bpp::AbstractStateMap.

◆ getModelStates() [2/2]

virtual std::vector<size_t> bpp::StateMap::getModelStates ( int  code) const
pure virtual
Parameters
codeThe int code of the alphabet state to check.
Returns
The corresponding model states, is any.

Implemented in bpp::AbstractStateMap.

◆ getNumberOfModelStates()


The documentation for this class was generated from the following file: