bpp-phyl  2.2.0
bpp::SubstitutionRegister Class Referenceabstract

The SubstitutionRegister interface. More...

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

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

Public Member Functions

 SubstitutionRegister ()
 
virtual ~SubstitutionRegister ()
 
virtual SubstitutionRegisterclone () const =0
 
virtual const Alphabet * getAlphabet () const =0
 
virtual const SubstitutionModelgetSubstitutionModel () const =0
 
virtual size_t getNumberOfSubstitutionTypes () const =0
 
virtual size_t getType (size_t fromState, size_t toState) const =0
 Get the substitution type far a given pair of model states. More...
 
virtual std::string getTypeName (size_t type) const =0
 Get the name of a given substitution type. More...
 

Detailed Description

The SubstitutionRegister interface.

Substitution registers are simple classes that define categories of substitutions, and assign an index to them. Substitution registers are defined according to a given substitution model.

Author
Julien Dutheil

Definition at line 72 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ SubstitutionRegister()

bpp::SubstitutionRegister::SubstitutionRegister ( )
inline

Definition at line 76 of file SubstitutionRegister.h.

◆ ~SubstitutionRegister()

virtual bpp::SubstitutionRegister::~SubstitutionRegister ( )
inlinevirtual

Definition at line 77 of file SubstitutionRegister.h.

Member Function Documentation

◆ clone()

◆ getAlphabet()

◆ getNumberOfSubstitutionTypes()

◆ getSubstitutionModel()

virtual const SubstitutionModel* bpp::SubstitutionRegister::getSubstitutionModel ( ) const
pure virtual
Returns
The substitution model associated to this instance.

Implemented in bpp::AbstractSubstitutionRegister.

◆ getType()

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

Get the substitution type far a given pair of model 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::GeneralSubstitutionRegister, bpp::CompleteSubstitutionRegister, bpp::TotalSubstitutionRegister, and bpp::CategorySubstitutionRegister.

Referenced by bpp::CompleteSubstitutionRegister::CompleteSubstitutionRegister(), bpp::MutationPath::getEventCounts(), bpp::SubstitutionMappingTools::getNormalizationsPerBranch(), and bpp::CompleteSubstitutionRegister::getType().

◆ getTypeName()

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::AAExteriorSubstitutionRegister, bpp::AAInteriorSubstitutionRegister, bpp::SelectedSubstitutionRegister, bpp::GeneralSubstitutionRegister, bpp::CompleteSubstitutionRegister, bpp::TotalSubstitutionRegister, and bpp::CategorySubstitutionRegister.

Referenced by bpp::SubstitutionMappingTools::getNormalizationsPerBranch(), and bpp::CompleteSubstitutionRegister::getTypeName().


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