bpp-phyl  2.2.0
bpp::AbstractSubstitutionRegister Class Referenceabstract

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

+ Inheritance diagram for bpp::AbstractSubstitutionRegister:
+ Collaboration diagram for bpp::AbstractSubstitutionRegister:

Public Member Functions

 AbstractSubstitutionRegister (const SubstitutionModel *model)
 
 AbstractSubstitutionRegister (const AbstractSubstitutionRegister &asr)
 
AbstractSubstitutionRegisteroperator= (const AbstractSubstitutionRegister &asr)
 
virtual ~AbstractSubstitutionRegister ()
 
const SubstitutionModelgetSubstitutionModel () const
 
const Alphabet * getAlphabet () const
 
virtual SubstitutionRegisterclone () 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...
 

Protected Attributes

const SubstitutionModelmodel_
 

Detailed Description

Definition at line 121 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ AbstractSubstitutionRegister() [1/2]

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

Definition at line 128 of file SubstitutionRegister.h.

◆ AbstractSubstitutionRegister() [2/2]

bpp::AbstractSubstitutionRegister::AbstractSubstitutionRegister ( const AbstractSubstitutionRegister asr)
inline

Definition at line 132 of file SubstitutionRegister.h.

◆ ~AbstractSubstitutionRegister()

virtual bpp::AbstractSubstitutionRegister::~AbstractSubstitutionRegister ( )
inlinevirtual

Definition at line 142 of file SubstitutionRegister.h.

Member Function Documentation

◆ clone()

◆ getAlphabet()

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

Implements bpp::SubstitutionRegister.

Definition at line 147 of file SubstitutionRegister.h.

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

◆ getNumberOfSubstitutionTypes()

◆ getSubstitutionModel()

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

Implements bpp::SubstitutionRegister.

Definition at line 145 of file SubstitutionRegister.h.

References model_.

◆ getType()

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

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 virtualinherited

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().

◆ operator=()

Member Data Documentation

◆ model_


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