bpp-phyl  2.2.0
bpp::AAInteriorSubstitutionRegister Class Reference

Indexes only intra amino-acid substitutions. Every group represents a substitutions for the same amino acid. Met and Trp are not taken into account due their non-degenerescence. More...

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

+ Inheritance diagram for bpp::AAInteriorSubstitutionRegister:
+ Collaboration diagram for bpp::AAInteriorSubstitutionRegister:

Public Member Functions

 AAInteriorSubstitutionRegister (const CodonSubstitutionModel *model)
 
AAInteriorSubstitutionRegisterclone () const
 
 ~AAInteriorSubstitutionRegister ()
 
std::string getTypeName (size_t type) const
 names of the types are their number. More...
 
size_t getType (size_t i, size_t j) const
 Get the substitution type far a given pair of model states. More...
 
size_t getNumberOfSubstitutionTypes () const
 
const SubstitutionModelgetSubstitutionModel () const
 
const Alphabet * getAlphabet () const
 

Protected Member Functions

void updateTypes_ ()
 

Protected Attributes

size_t size_
 The size of the matrix, i.e. the number of states. More...
 
RowMatrix< size_t > matrix_
 The matrix of the substitution register. More...
 
std::map< size_t, std::map< size_t, std::vector< size_t > > > types_
 The map from substitution types to the map of from states to the vector of target states. More...
 
const SubstitutionModelmodel_
 

Private Attributes

std::map< std::string, size_t > categoryCorrespondance_
 

Detailed Description

Indexes only intra amino-acid substitutions. Every group represents a substitutions for the same amino acid. Met and Trp are not taken into account due their non-degenerescence.

Author
Juraj Michalik

Definition at line 648 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ AAInteriorSubstitutionRegister()

bpp::AAInteriorSubstitutionRegister::AAInteriorSubstitutionRegister ( const CodonSubstitutionModel model)
inline

◆ ~AAInteriorSubstitutionRegister()

bpp::AAInteriorSubstitutionRegister::~AAInteriorSubstitutionRegister ( )
inline

Definition at line 686 of file SubstitutionRegister.h.

Member Function Documentation

◆ clone()

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

Reimplemented from bpp::GeneralSubstitutionRegister.

Definition at line 684 of file SubstitutionRegister.h.

References AAInteriorSubstitutionRegister().

◆ 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::GeneralSubstitutionRegister::getNumberOfSubstitutionTypes ( ) const
inlinevirtualinherited
Returns
The number of substitution types supported by this class.

Implements bpp::SubstitutionRegister.

Definition at line 544 of file SubstitutionRegister.h.

References bpp::GeneralSubstitutionRegister::types_.

◆ 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::GeneralSubstitutionRegister::getType ( size_t  fromState,
size_t  toState 
) const
inlinevirtualinherited

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 539 of file SubstitutionRegister.h.

References bpp::GeneralSubstitutionRegister::matrix_.

◆ getTypeName()

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

names of the types are their number.

Reimplemented from bpp::GeneralSubstitutionRegister.

Definition at line 689 of file SubstitutionRegister.h.

References categoryCorrespondance_, and bpp::GeneralSubstitutionRegister::types_.

◆ updateTypes_()

Member Data Documentation

◆ categoryCorrespondance_

std::map<std::string, size_t> bpp::AAInteriorSubstitutionRegister::categoryCorrespondance_
private

Definition at line 651 of file SubstitutionRegister.h.

Referenced by AAInteriorSubstitutionRegister(), and getTypeName().

◆ matrix_

◆ model_

◆ size_

size_t bpp::GeneralSubstitutionRegister::size_
protectedinherited

The size of the matrix, i.e. the number of states.

Definition at line 480 of file SubstitutionRegister.h.

Referenced by bpp::GeneralSubstitutionRegister::GeneralSubstitutionRegister(), and bpp::GeneralSubstitutionRegister::operator=().

◆ types_

std::map<size_t, std::map<size_t, std::vector<size_t> > > bpp::GeneralSubstitutionRegister::types_
protectedinherited

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