bpp-phyl  2.2.0
bpp::TotalSubstitutionRegister Class Reference

Count all substitutions. More...

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

+ Inheritance diagram for bpp::TotalSubstitutionRegister:
+ Collaboration diagram for bpp::TotalSubstitutionRegister:

Public Member Functions

 TotalSubstitutionRegister (const SubstitutionModel *model)
 
TotalSubstitutionRegisterclone () const
 
size_t getNumberOfSubstitutionTypes () const
 
size_t getType (size_t fromState, size_t toState) const
 Get the substitution type far a given pair of model states. More...
 
std::string getTypeName (size_t type) const
 Get the name of a given substitution type. More...
 
const SubstitutionModelgetSubstitutionModel () const
 
const Alphabet * getAlphabet () const
 

Protected Attributes

const SubstitutionModelmodel_
 

Detailed Description

Count all substitutions.

This register has only 1 substitution type, mapped as:

  • 0 not a substitution
  • 1 a substitution

Definition at line 319 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ TotalSubstitutionRegister()

bpp::TotalSubstitutionRegister::TotalSubstitutionRegister ( const SubstitutionModel model)
inline

Definition at line 323 of file SubstitutionRegister.h.

Referenced by clone().

Member Function Documentation

◆ clone()

TotalSubstitutionRegister* bpp::TotalSubstitutionRegister::clone ( ) const
inlinevirtual

Implements bpp::SubstitutionRegister.

Definition at line 327 of file SubstitutionRegister.h.

References TotalSubstitutionRegister().

◆ getAlphabet()

const Alphabet* bpp::AbstractSubstitutionRegister::getAlphabet ( ) const
inlinevirtualinherited
Returns
The alphabet associated to this instance.

Implements bpp::SubstitutionRegister.

Definition at line 147 of file SubstitutionRegister.h.

References bpp::SubstitutionModel::getAlphabet(), and bpp::AbstractSubstitutionRegister::model_.

◆ getNumberOfSubstitutionTypes()

size_t bpp::TotalSubstitutionRegister::getNumberOfSubstitutionTypes ( ) const
inlinevirtual
Returns
The number of substitution types supported by this class.

Implements bpp::SubstitutionRegister.

Definition at line 330 of file SubstitutionRegister.h.

◆ getSubstitutionModel()

const SubstitutionModel* bpp::AbstractSubstitutionRegister::getSubstitutionModel ( ) const
inlinevirtualinherited
Returns
The substitution model associated to this instance.

Implements bpp::SubstitutionRegister.

Definition at line 145 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::model_.

◆ getType()

size_t bpp::TotalSubstitutionRegister::getType ( size_t  fromState,
size_t  toState 
) const
inlinevirtual

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.

Implements bpp::SubstitutionRegister.

Definition at line 332 of file SubstitutionRegister.h.

◆ getTypeName()

std::string bpp::TotalSubstitutionRegister::getTypeName ( size_t  type) const
inlinevirtual

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.

Implements bpp::SubstitutionRegister.

Definition at line 337 of file SubstitutionRegister.h.

Member Data Documentation

◆ model_


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