bpp-seq  2.2.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) throw (IOException)
 Create a new AAIndex1Entry from an input stream. More...
 
 AAIndex1Entry (const AAIndex1Entry &index)
 
AAIndex1Entryoperator= (const AAIndex1Entry &index)
 
virtual ~AAIndex1Entry ()
 
AAIndex1Entryclone () const
 
double getIndex (int state) const throw (BadIntException)
 Get the index associated to a state. More...
 
double getIndex (const std::string &state) const throw (BadCharException)
 Get the index associated to a state. More...
 
std::vector< double > * getIndexVector () const
 
const AlphabetgetAlphabet () const
 Get the alphabet associated to this index. More...
 

Private Attributes

std::vector< double > property_
 
const ProteicAlphabetalpha_
 

Detailed Description

Create a AlphabetIndex1 object from an AAIndex2 entry.

Definition at line 51 of file AAIndex1Entry.h.

Constructor & Destructor Documentation

◆ AAIndex1Entry() [1/2]

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

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 49 of file AAIndex1Entry.cpp.

Referenced by clone().

◆ AAIndex1Entry() [2/2]

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

Definition at line 67 of file AAIndex1Entry.h.

◆ ~AAIndex1Entry()

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

Definition at line 79 of file AAIndex1Entry.h.

Member Function Documentation

◆ clone()

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

Implements bpp::AlphabetIndex1.

Definition at line 81 of file AAIndex1Entry.h.

References AAIndex1Entry().

◆ getAlphabet()

const Alphabet* bpp::AAIndex1Entry::getAlphabet ( ) const
inlinevirtual

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex1.

Definition at line 97 of file AAIndex1Entry.h.

References alpha_.

◆ getIndex() [1/2]

double bpp::AAIndex1Entry::getIndex ( int  state) const
throw (BadIntException
)
inlinevirtual

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 84 of file AAIndex1Entry.h.

References alpha_, and property_.

◆ getIndex() [2/2]

double bpp::AAIndex1Entry::getIndex ( const std::string &  state) const
throw (BadCharException
)
inlinevirtual

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 90 of file AAIndex1Entry.h.

References alpha_, bpp::LetterAlphabet::charToInt(), and property_.

◆ getIndexVector()

std::vector<double>* bpp::AAIndex1Entry::getIndexVector ( ) const
inlinevirtual
Returns
A vector object with all indices.

Implements bpp::AlphabetIndex1.

Definition at line 95 of file AAIndex1Entry.h.

References property_.

◆ operator=()

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

Definition at line 72 of file AAIndex1Entry.h.

References alpha_, and property_.

Member Data Documentation

◆ alpha_

const ProteicAlphabet* bpp::AAIndex1Entry::alpha_
private

Definition at line 56 of file AAIndex1Entry.h.

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

◆ property_

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

Definition at line 55 of file AAIndex1Entry.h.

Referenced by getIndex(), getIndexVector(), and operator=().


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