bpp-seq3  3.0.0
bpp::CodonFromProteicAlphabetIndex2 Class Reference

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

+ Inheritance diagram for bpp::CodonFromProteicAlphabetIndex2:
+ Collaboration diagram for bpp::CodonFromProteicAlphabetIndex2:

Public Member Functions

 CodonFromProteicAlphabetIndex2 (std::shared_ptr< const GeneticCode > gencode, std::shared_ptr< const AlphabetIndex2 > protalphindex)
 
 CodonFromProteicAlphabetIndex2 (const CodonFromProteicAlphabetIndex2 &cfp)
 
CodonFromProteicAlphabetIndex2operator= (const CodonFromProteicAlphabetIndex2 &cfp)
 
virtual ~CodonFromProteicAlphabetIndex2 ()
 
CodonFromProteicAlphabetIndex2clone () const override
 
double getIndex (int state1, int state2) const override
 Get the index associated to a pair of states. More...
 
double getIndex (const std::string &state1, const std::string &state2) const override
 Get the index associated to a pair of states. 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 Matrix< double > & getIndexMatrix () const override
 
bool isSymmetric () const override
 

Private Member Functions

void fillIndex_ (std::shared_ptr< const AlphabetIndex2 > &protAlphIndex_)
 

Private Attributes

std::shared_ptr< const CodonAlphabetalpha_
 
std::shared_ptr< const GeneticCodegencode_
 
LinearMatrix< double > vIndex_
 
bool isSymmetric_
 

Detailed Description

Definition at line 21 of file CodonFromProteicAlphabetIndex2.h.

Constructor & Destructor Documentation

◆ CodonFromProteicAlphabetIndex2() [1/2]

bpp::CodonFromProteicAlphabetIndex2::CodonFromProteicAlphabetIndex2 ( std::shared_ptr< const GeneticCode gencode,
std::shared_ptr< const AlphabetIndex2 protalphindex 
)
inline

Definition at line 33 of file CodonFromProteicAlphabetIndex2.h.

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

Referenced by clone().

◆ CodonFromProteicAlphabetIndex2() [2/2]

bpp::CodonFromProteicAlphabetIndex2::CodonFromProteicAlphabetIndex2 ( const CodonFromProteicAlphabetIndex2 cfp)
inline

Definition at line 45 of file CodonFromProteicAlphabetIndex2.h.

◆ ~CodonFromProteicAlphabetIndex2()

virtual bpp::CodonFromProteicAlphabetIndex2::~CodonFromProteicAlphabetIndex2 ( )
inlinevirtual

Definition at line 62 of file CodonFromProteicAlphabetIndex2.h.

Member Function Documentation

◆ alphabet()

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

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 82 of file CodonFromProteicAlphabetIndex2.h.

References alpha_.

◆ clone()

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

Implements bpp::AlphabetIndex2.

Definition at line 64 of file CodonFromProteicAlphabetIndex2.h.

References CodonFromProteicAlphabetIndex2().

◆ fillIndex_()

void bpp::CodonFromProteicAlphabetIndex2::fillIndex_ ( std::shared_ptr< const AlphabetIndex2 > &  protAlphIndex_)
inlineprivate

Definition at line 98 of file CodonFromProteicAlphabetIndex2.h.

References gencode_, getAlphabet(), and vIndex_.

Referenced by CodonFromProteicAlphabetIndex2().

◆ getAlphabet()

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

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 77 of file CodonFromProteicAlphabetIndex2.h.

References alpha_.

Referenced by fillIndex_(), and getIndex().

◆ getIndex() [1/2]

double bpp::CodonFromProteicAlphabetIndex2::getIndex ( const std::string &  state1,
const std::string &  state2 
) const
inlineoverridevirtual

Get the index associated to a pair of states.

Parameters
state1First state to consider, as a string value.
state2Second state to consider, as a string value.
Returns
The index associated to the pair of states.

Implements bpp::AlphabetIndex2.

Definition at line 72 of file CodonFromProteicAlphabetIndex2.h.

References getAlphabet(), and vIndex_.

◆ getIndex() [2/2]

double bpp::CodonFromProteicAlphabetIndex2::getIndex ( int  state1,
int  state2 
) const
inlineoverridevirtual

Get the index associated to a pair of states.

Parameters
state1First state to consider, as a int value in the Alphabet
state2Second state to consider, as a int value in the Alphabet
Returns
The index associated to the pair of states.

Implements bpp::AlphabetIndex2.

Definition at line 67 of file CodonFromProteicAlphabetIndex2.h.

References getAlphabet(), and vIndex_.

◆ getIndexMatrix()

const Matrix<double>& bpp::CodonFromProteicAlphabetIndex2::getIndexMatrix ( ) const
inlineoverridevirtual
Returns
A matrix object with all indices.

Implements bpp::AlphabetIndex2.

Definition at line 87 of file CodonFromProteicAlphabetIndex2.h.

References vIndex_.

◆ isSymmetric()

bool bpp::CodonFromProteicAlphabetIndex2::isSymmetric ( ) const
inlineoverridevirtual
Returns
True if the index is symetric (that is, index(i,j) == index(j, i)).

Implements bpp::AlphabetIndex2.

Definition at line 92 of file CodonFromProteicAlphabetIndex2.h.

References isSymmetric_.

◆ operator=()

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

Definition at line 52 of file CodonFromProteicAlphabetIndex2.h.

References alpha_, gencode_, isSymmetric_, and vIndex_.

Member Data Documentation

◆ alpha_

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

Definition at line 25 of file CodonFromProteicAlphabetIndex2.h.

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

◆ gencode_

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

Definition at line 26 of file CodonFromProteicAlphabetIndex2.h.

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

◆ isSymmetric_

bool bpp::CodonFromProteicAlphabetIndex2::isSymmetric_
private

Definition at line 30 of file CodonFromProteicAlphabetIndex2.h.

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

◆ vIndex_

LinearMatrix<double> bpp::CodonFromProteicAlphabetIndex2::vIndex_
private

Definition at line 28 of file CodonFromProteicAlphabetIndex2.h.

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


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