bpp-seq3
3.0.0
|
Simple dissimilarity distance. More...
#include <Bpp/Seq/AlphabetIndex/SimpleIndexDistance.h>
Public Member Functions | |
SimpleIndexDistance (std::shared_ptr< AlphabetIndex1 > index) | |
SimpleIndexDistance (const SimpleIndexDistance &sid) | |
SimpleIndexDistance & | operator= (const SimpleIndexDistance &sid) |
virtual | ~SimpleIndexDistance () |
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 Alphabet > | getAlphabet () const override |
Get the alphabet associated to this index. More... | |
const Alphabet & | alphabet () const override |
Get the alphabet associated to this index. More... | |
SimpleIndexDistance * | clone () const override |
const Matrix< double > & | getIndexMatrix () const override |
void | setSymmetric (bool yn) |
bool | isSymmetric () const override |
std::shared_ptr< const AlphabetIndex1 > | getAlphabetIndex1 () const |
Protected Member Functions | |
void | computeIndexMatrix_ () |
Private Attributes | |
std::shared_ptr< AlphabetIndex1 > | index_ |
size_t | size_ |
RowMatrix< double > | indexMatrix_ |
bool | sym_ |
Simple dissimilarity distance.
Take a one-dimensional index and return the difference between the indexes of two states.
Definition at line 27 of file SimpleIndexDistance.h.
|
inline |
Definition at line 37 of file SimpleIndexDistance.h.
References computeIndexMatrix_().
Referenced by clone().
|
inline |
Definition at line 46 of file SimpleIndexDistance.h.
|
inlinevirtual |
Definition at line 62 of file SimpleIndexDistance.h.
|
inlineoverridevirtual |
Get the alphabet associated to this index.
Implements bpp::AlphabetIndex2.
Definition at line 77 of file SimpleIndexDistance.h.
References index_.
|
inlineoverridevirtual |
Implements bpp::AlphabetIndex2.
Definition at line 79 of file SimpleIndexDistance.h.
References SimpleIndexDistance().
|
inlineprotected |
Definition at line 84 of file SimpleIndexDistance.h.
References getAlphabet(), index_, indexMatrix_, size_, and sym_.
Referenced by setSymmetric(), and SimpleIndexDistance().
|
inlineoverridevirtual |
Get the alphabet associated to this index.
Implements bpp::AlphabetIndex2.
Definition at line 75 of file SimpleIndexDistance.h.
References index_.
Referenced by computeIndexMatrix_(), and getIndex().
|
inline |
Definition at line 109 of file SimpleIndexDistance.h.
References index_.
|
inlineoverridevirtual |
Get the index associated to a pair of states.
state1 | First state to consider, as a string value. |
state2 | Second state to consider, as a string value. |
Implements bpp::AlphabetIndex2.
Definition at line 70 of file SimpleIndexDistance.h.
References getAlphabet(), and indexMatrix_.
|
inlineoverridevirtual |
Get the index associated to a pair of states.
state1 | First state to consider, as a int value in the Alphabet |
state2 | Second state to consider, as a int value in the Alphabet |
Implements bpp::AlphabetIndex2.
Definition at line 65 of file SimpleIndexDistance.h.
References getAlphabet(), and indexMatrix_.
|
inlineoverridevirtual |
Implements bpp::AlphabetIndex2.
Definition at line 81 of file SimpleIndexDistance.h.
References indexMatrix_.
|
inlineoverridevirtual |
Implements bpp::AlphabetIndex2.
Definition at line 104 of file SimpleIndexDistance.h.
References sym_.
|
inline |
Definition at line 53 of file SimpleIndexDistance.h.
References index_, indexMatrix_, size_, and sym_.
|
inline |
Definition at line 98 of file SimpleIndexDistance.h.
References computeIndexMatrix_(), and sym_.
|
private |
Definition at line 31 of file SimpleIndexDistance.h.
Referenced by alphabet(), computeIndexMatrix_(), getAlphabet(), getAlphabetIndex1(), and operator=().
|
private |
Definition at line 33 of file SimpleIndexDistance.h.
Referenced by computeIndexMatrix_(), getIndex(), getIndexMatrix(), and operator=().
|
private |
Definition at line 32 of file SimpleIndexDistance.h.
Referenced by computeIndexMatrix_(), and operator=().
|
private |
Definition at line 34 of file SimpleIndexDistance.h.
Referenced by computeIndexMatrix_(), isSymmetric(), operator=(), and setSymmetric().