bpp-seq3  3.0.0
bpp::AAIndex1Entry Class Reference

Create a AlphabetIndex1 object from an AAIndex2 entry. More...

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

+ Inheritance diagram for bpp::AAIndex1Entry:
+ Collaboration diagram for bpp::AAIndex1Entry:

Public Member Functions

 AAIndex1Entry (std::istream &input)
 Create a new AAIndex1Entry from an input stream. More...
 
 AAIndex1Entry (const AAIndex1Entry &index)
 
AAIndex1Entryoperator= (const AAIndex1Entry &index)
 
virtual ~AAIndex1Entry ()
 
AAIndex1Entryclone () 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...
 
const std::vector< double > & indexVector () const override
 
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...
 

Private Attributes

std::vector< double > property_
 
std::shared_ptr< const ProteicAlphabetalpha_
 

Detailed Description

Create a AlphabetIndex1 object from an AAIndex2 entry.

Definition at line 16 of file AAIndex1Entry.h.

Constructor & Destructor Documentation

◆ AAIndex1Entry() [1/2]

AAIndex1Entry::AAIndex1Entry ( std::istream &  input)

Create a new AAIndex1Entry from an input stream.

Parameters
inputThe input stream to use.
Exceptions
IOExceptionif the stream content does not follow the AAIndex1 database entry format.

Definition at line 14 of file AAIndex1Entry.cpp.

References bpp::FileTools::getNextLine(), bpp::StringTokenizer::nextToken(), bpp::StringTokenizer::numberOfRemainingTokens(), property_, and bpp::TextTools::toDouble().

Referenced by clone().

◆ AAIndex1Entry() [2/2]

bpp::AAIndex1Entry::AAIndex1Entry ( const AAIndex1Entry index)
inline

Definition at line 31 of file AAIndex1Entry.h.

◆ ~AAIndex1Entry()

virtual bpp::AAIndex1Entry::~AAIndex1Entry ( )
inlinevirtual

Definition at line 43 of file AAIndex1Entry.h.

Member Function Documentation

◆ alphabet()

const Alphabet& bpp::ProteicAlphabetIndex1::alphabet ( ) const
inlineoverridevirtualinherited

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex1.

Definition at line 99 of file AlphabetIndex1.h.

References bpp::ProteicAlphabetIndex1::alpha_.

◆ clone()

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

Implements bpp::ProteicAlphabetIndex1.

Definition at line 45 of file AAIndex1Entry.h.

References AAIndex1Entry().

◆ getAlphabet()

◆ getIndex() [1/2]

double bpp::AAIndex1Entry::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 53 of file AAIndex1Entry.h.

References bpp::ProteicAlphabetIndex1::getAlphabet(), and property_.

◆ getIndex() [2/2]

double bpp::AAIndex1Entry::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 48 of file AAIndex1Entry.h.

References bpp::ProteicAlphabetIndex1::getAlphabet(), and property_.

◆ indexVector()

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

Implements bpp::AlphabetIndex1.

Definition at line 58 of file AAIndex1Entry.h.

References property_.

◆ operator=()

AAIndex1Entry& bpp::AAIndex1Entry::operator= ( const AAIndex1Entry index)
inline

Definition at line 36 of file AAIndex1Entry.h.

References bpp::ProteicAlphabetIndex1::operator=(), and property_.

Member Data Documentation

◆ alpha_

std::shared_ptr<const ProteicAlphabet> bpp::ProteicAlphabetIndex1::alpha_
privateinherited

◆ property_

std::vector<double> bpp::AAIndex1Entry::property_
private

Definition at line 20 of file AAIndex1Entry.h.

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


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