bpp-seq  2.2.0
bpp::AAIndex2Entry Class Reference

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

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

+ Inheritance diagram for bpp::AAIndex2Entry:
+ Collaboration diagram for bpp::AAIndex2Entry:

Public Member Functions

 AAIndex2Entry (std::istream &input, bool sym=true) throw (IOException)
 Create a new AAIndex2Entry from an input stream. More...
 
 AAIndex2Entry (const AAIndex2Entry &index)
 
AAIndex2Entryoperator= (const AAIndex2Entry &index)
 
virtual ~AAIndex2Entry ()
 
const AlphabetgetAlphabet () const
 Get the alphabet associated to this index. More...
 
AAIndex2Entryclone () const
 
double getIndex (int state1, int state2) const throw (BadIntException)
 Get the index associated to a pair of states. More...
 
double getIndex (const std::string &state1, const std::string &state2) const throw (BadCharException)
 Get the index associated to a pair of states. More...
 
LinearMatrix< double > * getIndexMatrix () const
 
bool isSymmetric () const
 

Private Attributes

LinearMatrix< double > property_
 
const ProteicAlphabetalpha_
 
bool sym_
 

Detailed Description

Create a AlphabetIndex2 object from an AAIndex2 entry.

Definition at line 52 of file AAIndex2Entry.h.

Constructor & Destructor Documentation

◆ AAIndex2Entry() [1/2]

AAIndex2Entry::AAIndex2Entry ( std::istream &  input,
bool  sym = true 
)
throw (IOException
)

Create a new AAIndex2Entry from an input stream.

Parameters
inputThe input stream to use.
symTell if the matrix is symmetric. This option as an effect only if the matrix is specified as a triangle in the entry. If sym==true, the oher triangle will be built by symmetry. If sym==false, the other triangle will be set to (-) the given triangle. If the input matrix is square, it will be considered non-symetric.
Exceptions
IOExceptionif the stream content does not follow the AAIndex2 database entry format.

Definition at line 50 of file AAIndex2Entry.cpp.

Referenced by clone().

◆ AAIndex2Entry() [2/2]

bpp::AAIndex2Entry::AAIndex2Entry ( const AAIndex2Entry index)
inline

Definition at line 74 of file AAIndex2Entry.h.

◆ ~AAIndex2Entry()

virtual bpp::AAIndex2Entry::~AAIndex2Entry ( )
inlinevirtual

Definition at line 88 of file AAIndex2Entry.h.

Member Function Documentation

◆ clone()

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

Implements bpp::AlphabetIndex2.

Definition at line 93 of file AAIndex2Entry.h.

References AAIndex2Entry().

◆ getAlphabet()

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

Get the alphabet associated to this index.

Returns
Alphabet The alphabet associated to this index.

Implements bpp::AlphabetIndex2.

Definition at line 91 of file AAIndex2Entry.h.

References alpha_.

◆ getIndex() [1/2]

double bpp::AAIndex2Entry::getIndex ( int  state1,
int  state2 
) const
throw (BadIntException
)
inlinevirtual

Get the index associated to a pair of states.

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

Implements bpp::AlphabetIndex2.

Definition at line 95 of file AAIndex2Entry.h.

References alpha_, bpp::AbstractAlphabet::getStateIndex(), and property_.

◆ getIndex() [2/2]

double bpp::AAIndex2Entry::getIndex ( const std::string &  state1,
const std::string &  state2 
) const
throw (BadCharException
)
inlinevirtual

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 102 of file AAIndex2Entry.h.

References alpha_, bpp::AbstractAlphabet::getStateIndex(), and property_.

◆ getIndexMatrix()

LinearMatrix<double>* bpp::AAIndex2Entry::getIndexMatrix ( ) const
inlinevirtual
Returns
A matrix object with all indices.

Implements bpp::AlphabetIndex2.

Definition at line 109 of file AAIndex2Entry.h.

References property_.

◆ isSymmetric()

bool bpp::AAIndex2Entry::isSymmetric ( ) const
inlinevirtual
Returns
True if the index is symatric (that is, index(i,j) == index(j, i)).

Implements bpp::AlphabetIndex2.

Definition at line 111 of file AAIndex2Entry.h.

References sym_.

◆ operator=()

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

Definition at line 80 of file AAIndex2Entry.h.

References alpha_, property_, and sym_.

Member Data Documentation

◆ alpha_

const ProteicAlphabet* bpp::AAIndex2Entry::alpha_
private

Definition at line 57 of file AAIndex2Entry.h.

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

◆ property_

LinearMatrix<double> bpp::AAIndex2Entry::property_
private

Definition at line 56 of file AAIndex2Entry.h.

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

◆ sym_

bool bpp::AAIndex2Entry::sym_
private

Definition at line 58 of file AAIndex2Entry.h.

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


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