bpp-phyl3  3.0.0
bpp::SubstitutionRegisterInterface Class Referenceabstract

The SubstitutionRegister interface. More...

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

+ Inheritance diagram for bpp::SubstitutionRegisterInterface:
+ Collaboration diagram for bpp::SubstitutionRegisterInterface:

Public Member Functions

 SubstitutionRegisterInterface ()
 
virtual ~SubstitutionRegisterInterface ()
 
virtual SubstitutionRegisterInterfaceclone () const =0
 
virtual const Alphabetalphabet () const =0
 
virtual std::shared_ptr< const AlphabetgetAlphabet () const =0
 
virtual const StateMapInterfacestateMap () const =0
 
virtual std::shared_ptr< const StateMapInterfacegetStateMap () const =0
 
virtual size_t getNumberOfSubstitutionTypes () const =0
 
virtual const std::string & getName () const =0
 Get the name of the register. More...
 
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...
 

Detailed Description

The SubstitutionRegister interface.

Substitution registers are simple classes that define categories of substitutions, and assign an index to them. Substitution registers are defined according to a given substitution state map.

Author
Julien Dutheil

Definition at line 38 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ SubstitutionRegisterInterface()

bpp::SubstitutionRegisterInterface::SubstitutionRegisterInterface ( )
inline

Definition at line 42 of file SubstitutionRegister.h.

◆ ~SubstitutionRegisterInterface()

virtual bpp::SubstitutionRegisterInterface::~SubstitutionRegisterInterface ( )
inlinevirtual

Definition at line 43 of file SubstitutionRegister.h.

Member Function Documentation

◆ alphabet()

virtual const Alphabet& bpp::SubstitutionRegisterInterface::alphabet ( ) const
pure virtual
Returns
The alphabet associated to this instance.

Implemented in bpp::AbstractSubstitutionRegister.

◆ clone()

◆ getAlphabet()

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

Implemented in bpp::AbstractSubstitutionRegister.

◆ getName()

virtual const std::string& bpp::SubstitutionRegisterInterface::getName ( ) const
pure virtual

Get the name of the register.

Returns
A string describing the register.

Implemented in bpp::AbstractSubstitutionRegister.

◆ getNumberOfSubstitutionTypes()

◆ getStateMap()

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

Implemented in bpp::AbstractSubstitutionRegister.

◆ getType()

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

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

◆ stateMap()

virtual const StateMapInterface& bpp::SubstitutionRegisterInterface::stateMap ( ) const
pure virtual
Returns
The state map associated to this instance.

Implemented in bpp::AbstractSubstitutionRegister.


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