bpp-seq3  3.0.0
bpp::CodonFromProteicAlphabetIndex1 Class Reference

AlphabetIndex1 for codon based on ProteicAlphabetIndex1. More...

#include <Bpp/Seq/AlphabetIndex/CodonFromProteicAlphabetIndex1.h>

+ Inheritance diagram for bpp::CodonFromProteicAlphabetIndex1:
+ Collaboration diagram for bpp::CodonFromProteicAlphabetIndex1:

Public Member Functions

 CodonFromProteicAlphabetIndex1 (std::shared_ptr< const GeneticCode > gencode, std::shared_ptr< const AlphabetIndex1 > protalphindex)
 
 CodonFromProteicAlphabetIndex1 (const CodonFromProteicAlphabetIndex1 &cfp)
 
CodonFromProteicAlphabetIndex1operator= (const CodonFromProteicAlphabetIndex1 &cfp)
 
virtual ~CodonFromProteicAlphabetIndex1 ()
 
CodonFromProteicAlphabetIndex1clone () const override
 
double getIndex (int state) const override
 Get the index associated to a state. More...
 
double getIndex (const std::string &state) const override
 Get the index associated to a state. More...
 
std::shared_ptr< const AlphabetgetAlphabet () const override
 Get the alphabet associated to this index. More...
 
const Alphabetalphabet () const override
 Get the alphabet associated to this index. More...
 
const std::vector< double > & indexVector () const override
 

Private Member Functions

void fillIndex_ (std::shared_ptr< const AlphabetIndex1 > protAlphIndex_)
 

Private Attributes

std::shared_ptr< const CodonAlphabetalpha_
 
std::shared_ptr< const GeneticCodegencode_
 
std::vector< double > vIndex_
 

Detailed Description

AlphabetIndex1 for codon based on ProteicAlphabetIndex1.

Definition at line 18 of file CodonFromProteicAlphabetIndex1.h.

Constructor & Destructor Documentation

◆ CodonFromProteicAlphabetIndex1() [1/2]

bpp::CodonFromProteicAlphabetIndex1::CodonFromProteicAlphabetIndex1 ( std::shared_ptr< const GeneticCode gencode,
std::shared_ptr< const AlphabetIndex1 protalphindex 
)
inline

Definition at line 27 of file CodonFromProteicAlphabetIndex1.h.

References fillIndex_(), and bpp::AlphabetTools::isProteicAlphabet().

Referenced by clone().

◆ CodonFromProteicAlphabetIndex1() [2/2]

bpp::CodonFromProteicAlphabetIndex1::CodonFromProteicAlphabetIndex1 ( const CodonFromProteicAlphabetIndex1 cfp)
inline

Definition at line 40 of file CodonFromProteicAlphabetIndex1.h.

◆ ~CodonFromProteicAlphabetIndex1()

virtual bpp::CodonFromProteicAlphabetIndex1::~CodonFromProteicAlphabetIndex1 ( )
inlinevirtual

Definition at line 55 of file CodonFromProteicAlphabetIndex1.h.

Member Function Documentation

◆ alphabet()

const Alphabet& bpp::CodonFromProteicAlphabetIndex1::alphabet ( ) const
inlineoverridevirtual

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex1.

Definition at line 78 of file CodonFromProteicAlphabetIndex1.h.

References alpha_.

◆ clone()

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

Implements bpp::AlphabetIndex1.

Definition at line 57 of file CodonFromProteicAlphabetIndex1.h.

References CodonFromProteicAlphabetIndex1().

◆ fillIndex_()

void bpp::CodonFromProteicAlphabetIndex1::fillIndex_ ( std::shared_ptr< const AlphabetIndex1 protAlphIndex_)
inlineprivate

Definition at line 89 of file CodonFromProteicAlphabetIndex1.h.

References gencode_, getAlphabet(), and vIndex_.

Referenced by CodonFromProteicAlphabetIndex1().

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::CodonFromProteicAlphabetIndex1::getAlphabet ( ) const
inlineoverridevirtual

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex1.

Definition at line 73 of file CodonFromProteicAlphabetIndex1.h.

References alpha_.

Referenced by fillIndex_(), and getIndex().

◆ getIndex() [1/2]

double bpp::CodonFromProteicAlphabetIndex1::getIndex ( const std::string &  state) const
inlineoverridevirtual

Get the index associated to a state.

Parameters
stateThe state to consider, as a string value.
Returns
The index associated to the state

Implements bpp::AlphabetIndex1.

Definition at line 68 of file CodonFromProteicAlphabetIndex1.h.

References getAlphabet(), and vIndex_.

◆ getIndex() [2/2]

double bpp::CodonFromProteicAlphabetIndex1::getIndex ( int  state) const
inlineoverridevirtual

Get the index associated to a state.

Parameters
stateThe state to consider, as a int value.
Returns
The index associated to the state

Implements bpp::AlphabetIndex1.

Definition at line 63 of file CodonFromProteicAlphabetIndex1.h.

References getAlphabet(), and vIndex_.

◆ indexVector()

const std::vector<double>& bpp::CodonFromProteicAlphabetIndex1::indexVector ( ) const
inlineoverridevirtual
Returns
A vector object with all indices.

Implements bpp::AlphabetIndex1.

Definition at line 83 of file CodonFromProteicAlphabetIndex1.h.

References vIndex_.

◆ operator=()

CodonFromProteicAlphabetIndex1& bpp::CodonFromProteicAlphabetIndex1::operator= ( const CodonFromProteicAlphabetIndex1 cfp)
inline

Definition at line 46 of file CodonFromProteicAlphabetIndex1.h.

References alpha_, gencode_, and vIndex_.

Member Data Documentation

◆ alpha_

std::shared_ptr<const CodonAlphabet> bpp::CodonFromProteicAlphabetIndex1::alpha_
private

Definition at line 22 of file CodonFromProteicAlphabetIndex1.h.

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

◆ gencode_

std::shared_ptr<const GeneticCode> bpp::CodonFromProteicAlphabetIndex1::gencode_
private

Definition at line 23 of file CodonFromProteicAlphabetIndex1.h.

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

◆ vIndex_

std::vector<double> bpp::CodonFromProteicAlphabetIndex1::vIndex_
private

Definition at line 24 of file CodonFromProteicAlphabetIndex1.h.

Referenced by fillIndex_(), getIndex(), indexVector(), and operator=().


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