bpp-phyl3  3.0.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 (std::shared_ptr< const StateMapInterface > stateMap, const std::string &name)
 
 AbstractSubstitutionRegister (const AbstractSubstitutionRegister &asr)
 
AbstractSubstitutionRegisteroperator= (const AbstractSubstitutionRegister &asr)
 
virtual ~AbstractSubstitutionRegister ()
 
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...
 
virtual SubstitutionRegisterInterfaceclone () 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

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

Detailed Description

Definition at line 103 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ AbstractSubstitutionRegister() [1/2]

bpp::AbstractSubstitutionRegister::AbstractSubstitutionRegister ( std::shared_ptr< const StateMapInterface stateMap,
const std::string &  name 
)
inline

Definition at line 111 of file SubstitutionRegister.h.

◆ AbstractSubstitutionRegister() [2/2]

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

Definition at line 115 of file SubstitutionRegister.h.

◆ ~AbstractSubstitutionRegister()

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

Definition at line 126 of file SubstitutionRegister.h.

Member Function Documentation

◆ alphabet()

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

Implements bpp::SubstitutionRegisterInterface.

Definition at line 133 of file SubstitutionRegister.h.

References stateMap_.

◆ clone()

◆ getAlphabet()

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

Implements bpp::SubstitutionRegisterInterface.

Definition at line 135 of file SubstitutionRegister.h.

References stateMap_.

◆ getName()

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

Get the name of the register.

Returns
A string describing the register.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 137 of file SubstitutionRegister.h.

References name_.

◆ getNumberOfSubstitutionTypes()

◆ getStateMap()

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

Implements bpp::SubstitutionRegisterInterface.

Definition at line 131 of file SubstitutionRegister.h.

References stateMap_.

◆ getType()

virtual size_t bpp::SubstitutionRegisterInterface::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::GeneralSubstitutionRegister, bpp::VectorOfSubstitutionRegisters, bpp::CompleteSubstitutionRegister, bpp::TotalSubstitutionRegister, bpp::KrKcSubstitutionRegister, bpp::DnDsSubstitutionRegister, bpp::SWSubstitutionRegister, bpp::TsTvSubstitutionRegister, bpp::GCPositionSubstitutionRegister, bpp::GCSynonymousSubstitutionRegister, and bpp::CategorySubstitutionRegister.

Referenced by bpp::MutationPath::getEventCounts(), bpp::LegacySubstitutionMappingTools::getNormalizationsPerBranch(), bpp::OneChangeRegisterTransitionModel::OneChangeRegisterTransitionModel(), and bpp::RegisterRatesSubstitutionModel::RegisterRatesSubstitutionModel().

◆ getTypeName()

◆ operator=()

◆ stateMap()

Member Data Documentation

◆ name_

std::string bpp::AbstractSubstitutionRegister::name_
protected

Definition at line 108 of file SubstitutionRegister.h.

Referenced by getName(), and operator=().

◆ stateMap_

std::shared_ptr<const StateMapInterface> bpp::AbstractSubstitutionRegister::stateMap_
protected

Definition at line 107 of file SubstitutionRegister.h.

Referenced by alphabet(), getAlphabet(), getStateMap(), operator=(), and stateMap().


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