bpp-phyl3  3.0.0
bpp::VectorOfSubstitutionRegisters Class Reference

Sets a Register based on a vector of Registers. The categories are intersection of categories of those Registers. More...

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

+ Inheritance diagram for bpp::VectorOfSubstitutionRegisters:
+ Collaboration diagram for bpp::VectorOfSubstitutionRegisters:

Public Member Functions

 VectorOfSubstitutionRegisters (std::shared_ptr< const StateMapInterface > stateMap)
 
 VectorOfSubstitutionRegisters (const VectorOfSubstitutionRegisters &vosr)
 
VectorOfSubstitutionRegistersclone () const override
 
virtual ~VectorOfSubstitutionRegisters ()
 
void addRegister (std::shared_ptr< SubstitutionRegisterInterface > reg)
 
size_t getType (size_t i, size_t j) const override
 Get the substitution type far a given pair of model states. More...
 
size_t getNumberOfSubstitutionTypes () const override
 
std::string getTypeName (size_t type) const override
 names of the types are the list of their types in the registers (separated with _). 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::vector< std::shared_ptr< SubstitutionRegisterInterface > > vSubReg_
 the vector of pointers to SubstitutionRegisters. More...
 

Detailed Description

Sets a Register based on a vector of Registers. The categories are intersection of categories of those Registers.

Author
Laurent Guéguen

Definition at line 280 of file SubstitutionRegister.h.

Constructor & Destructor Documentation

◆ VectorOfSubstitutionRegisters() [1/2]

bpp::VectorOfSubstitutionRegisters::VectorOfSubstitutionRegisters ( std::shared_ptr< const StateMapInterface stateMap)
inline

Definition at line 290 of file SubstitutionRegister.h.

Referenced by clone().

◆ VectorOfSubstitutionRegisters() [2/2]

bpp::VectorOfSubstitutionRegisters::VectorOfSubstitutionRegisters ( const VectorOfSubstitutionRegisters vosr)
inline

Definition at line 295 of file SubstitutionRegister.h.

◆ ~VectorOfSubstitutionRegisters()

virtual bpp::VectorOfSubstitutionRegisters::~VectorOfSubstitutionRegisters ( )
inlinevirtual

Definition at line 305 of file SubstitutionRegister.h.

Member Function Documentation

◆ addRegister()

void bpp::VectorOfSubstitutionRegisters::addRegister ( std::shared_ptr< SubstitutionRegisterInterface reg)
inline

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

VectorOfSubstitutionRegisters* bpp::VectorOfSubstitutionRegisters::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::VectorOfSubstitutionRegisters::getNumberOfSubstitutionTypes ( ) const
inlineoverridevirtual
Returns
The number of substitution types supported by this class.

Implements bpp::SubstitutionRegisterInterface.

Definition at line 337 of file SubstitutionRegister.h.

References vSubReg_.

Referenced by 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::VectorOfSubstitutionRegisters::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 318 of file SubstitutionRegister.h.

References vSubReg_.

◆ getTypeName()

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

names of the types are the list of their types in the registers (separated with _).

Implements bpp::SubstitutionRegisterInterface.

Definition at line 356 of file SubstitutionRegister.h.

References getNumberOfSubstitutionTypes(), and vSubReg_.

◆ stateMap()

Member Data Documentation

◆ name_

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

◆ stateMap_

◆ vSubReg_

std::vector< std::shared_ptr<SubstitutionRegisterInterface> > bpp::VectorOfSubstitutionRegisters::vSubReg_
private

the vector of pointers to SubstitutionRegisters.

Definition at line 287 of file SubstitutionRegister.h.

Referenced by addRegister(), getNumberOfSubstitutionTypes(), getType(), and getTypeName().


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