bpp-phyl3  3.0.0
bpp::CompleteSubstitutionRegister Class Reference

Completion of a given substitution register to consider all substitutions. The new substitutions are considered in an additional type. More...

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

+ Inheritance diagram for bpp::CompleteSubstitutionRegister:
+ Collaboration diagram for bpp::CompleteSubstitutionRegister:

Public Member Functions

 CompleteSubstitutionRegister (std::shared_ptr< const SubstitutionRegisterInterface > reg)
 
CompleteSubstitutionRegisterclone () const override
 
 CompleteSubstitutionRegister (const CompleteSubstitutionRegister &csr)
 
CompleteSubstitutionRegisteroperator= (const CompleteSubstitutionRegister &csr)
 
virtual ~CompleteSubstitutionRegister ()
 
size_t getNumberOfSubstitutionTypes () const override
 
size_t getType (size_t fromState, size_t toState) const override
 Get the substitution type far a given pair of model states. More...
 
std::string getTypeName (size_t type) const override
 Get the name of a given substitution type. More...
 
const StateMapInterfacestateMap () const override
 
std::shared_ptr< const StateMapInterfacegetStateMap () const override
 
const Alphabetalphabet () const override
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 
const std::string & getName () const override
 Get the name of the register. More...
 

Protected Attributes

std::shared_ptr< const StateMapInterfacestateMap_
 
std::string name_
 

Private Attributes

std::shared_ptr< const SubstitutionRegisterInterfacepreg_
 
bool isRegComplete_
 

Detailed Description

Completion of a given substitution register to consider all substitutions. The new substitutions are considered in an additional type.

Definition at line 191 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ CompleteSubstitutionRegister() [1/2]

bpp::CompleteSubstitutionRegister::CompleteSubstitutionRegister ( std::shared_ptr< const SubstitutionRegisterInterface reg)
inline

Definition at line 200 of file SubstitutionRegister.h.

References isRegComplete_.

Referenced by clone().

◆ CompleteSubstitutionRegister() [2/2]

bpp::CompleteSubstitutionRegister::CompleteSubstitutionRegister ( const CompleteSubstitutionRegister csr)
inline

Definition at line 221 of file SubstitutionRegister.h.

◆ ~CompleteSubstitutionRegister()

virtual bpp::CompleteSubstitutionRegister::~CompleteSubstitutionRegister ( )
inlinevirtual

Definition at line 235 of file SubstitutionRegister.h.

Member Function Documentation

◆ alphabet()

const Alphabet& bpp::AbstractSubstitutionRegister::alphabet ( ) const
inlineoverridevirtualinherited
Returns
The alphabet associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 133 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ clone()

CompleteSubstitutionRegister* bpp::CompleteSubstitutionRegister::clone ( ) const
inlineoverridevirtual

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::AbstractSubstitutionRegister::getAlphabet ( ) const
inlineoverridevirtualinherited
Returns
A shared_ptr toward the alphabet associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 135 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ getName()

const std::string& bpp::AbstractSubstitutionRegister::getName ( ) const
inlineoverridevirtualinherited

Get the name of the register.

Returns
A string describing the register.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 137 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::name_.

◆ getNumberOfSubstitutionTypes()

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

Implements bpp::SubstitutionRegisterInterface.

Definition at line 238 of file SubstitutionRegister.h.

References isRegComplete_, and preg_.

Referenced by getType(), and getTypeName().

◆ getStateMap()

std::shared_ptr<const StateMapInterface> bpp::AbstractSubstitutionRegister::getStateMap ( ) const
inlineoverridevirtualinherited
Returns
A shared_ptr toward the state map associated to this instance.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 131 of file SubstitutionRegister.h.

References bpp::AbstractSubstitutionRegister::stateMap_.

◆ getType()

size_t bpp::CompleteSubstitutionRegister::getType ( size_t  fromState,
size_t  toState 
) const
inlineoverridevirtual

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::SubstitutionRegisterInterface.

Definition at line 243 of file SubstitutionRegister.h.

References getNumberOfSubstitutionTypes(), and preg_.

◆ getTypeName()

std::string bpp::CompleteSubstitutionRegister::getTypeName ( size_t  type) const
inlineoverridevirtual

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::SubstitutionRegisterInterface.

Definition at line 255 of file SubstitutionRegister.h.

References getNumberOfSubstitutionTypes(), and preg_.

◆ operator=()

CompleteSubstitutionRegister& bpp::CompleteSubstitutionRegister::operator= ( const CompleteSubstitutionRegister csr)
inline

◆ stateMap()

Member Data Documentation

◆ isRegComplete_

bool bpp::CompleteSubstitutionRegister::isRegComplete_
private

◆ name_

std::string bpp::AbstractSubstitutionRegister::name_
protectedinherited

◆ preg_

std::shared_ptr<const SubstitutionRegisterInterface> bpp::CompleteSubstitutionRegister::preg_
private

◆ stateMap_


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