bpp-phyl  2.1.0
bpp::SubstitutionRegister Class Reference

The SubstitutionRegister interface. More...

#include <Bpp/Phyl/Mapping/SubstitutionRegister.h>

+ Inheritance diagram for bpp::SubstitutionRegister:
+ Collaboration diagram for bpp::SubstitutionRegister:

List of all members.

Public Member Functions

 SubstitutionRegister ()
virtual ~SubstitutionRegister ()
virtual SubstitutionRegisterclone () const =0
virtual const AlphabetgetAlphabet () const =0
virtual size_t getNumberOfSubstitutionTypes () const =0
virtual size_t getType (int fromState, int toState) const =0
 Get the substitution type far a given pair of states.
virtual std::string getTypeName (size_t type) const =0
 Get the name of a given substitution type.

Detailed Description

The SubstitutionRegister interface.

Substitution registers are simple classes that define categories of substitutions, and assign them an index.

Author:
Julien Dutheil

Definition at line 63 of file SubstitutionRegister.h.


Constructor & Destructor Documentation

virtual bpp::SubstitutionRegister::~SubstitutionRegister ( ) [inline, virtual]

Definition at line 68 of file SubstitutionRegister.h.


Member Function Documentation

virtual size_t bpp::SubstitutionRegister::getType ( int  fromState,
int  toState 
) const [pure virtual]

Get the substitution type far a given pair of states.

Parameters:
fromStateInitial state (should be a state supported by the specified alphabet).
toStateFinal state (should be a state supported by the specified alphabet).
Returns:
The index of the corresponding substitution type, ranging from 0 to 'getNumberOfSubstitutionTypes' + 1, as non-substitution (that is when fromState == toState) will always return 0.

Implemented in bpp::GCSynonymousSubstitutionRegister, bpp::DnDsSubstitutionRegister, bpp::TsTvSubstitutionRegister, bpp::TotalSubstitutionRegister, and bpp::CategorySubstitutionRegister.

Referenced by bpp::UniformizationSubstitutionCount::fillBMatrices_(), bpp::DecompositionSubstitutionCount::fillBMatrices_(), bpp::NaiveSubstitutionCount::getAllNumbersOfSubstitutions(), bpp::MutationPath::getEventCounts(), and bpp::NaiveSubstitutionCount::getNumberOfSubstitutions().

virtual std::string bpp::SubstitutionRegister::getTypeName ( size_t  type) const [pure virtual]

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.

Parameters:
typeIndex of the substitution (should be an size_t contained in the register).
Returns:
A string describing the substitution type.

Implemented in bpp::GCSynonymousSubstitutionRegister, bpp::DnDsSubstitutionRegister, bpp::TsTvSubstitutionRegister, bpp::TotalSubstitutionRegister, and bpp::CategorySubstitutionRegister.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends