5 #ifndef BPP_SEQ_ALPHABETINDEX_USERALPHABETINDEX2_H 6 #define BPP_SEQ_ALPHABETINDEX_USERALPHABETINDEX2_H 8 #include <Bpp/Numeric/Matrix/MatrixTools.h> 25 std::shared_ptr<const Alphabet>
alph_;
35 sym_ = MatrixTools::isSymmetric(index_);
60 return index_(alph_->getStateIndex(state1) - 1, alph_->getStateIndex(state2) - 1);
63 double getIndex(
const std::string& state1,
const std::string& state2)
const 65 return index_(alph_->getStateIndex(state1) - 1, alph_->getStateIndex(state2) - 1);
71 sym_ = MatrixTools::isSymmetric(index_);
89 #endif // BPP_SEQ_ALPHABETINDEX_USERALPHABETINDEX2_H std::shared_ptr< const Alphabet > getAlphabet() const
Get the alphabet associated to this index.
void setIndexMatrix(const Matrix< double > &mat)
This alphabet is used to deal NumericAlphabet.
virtual bool isSymmetric() const
UserAlphabetIndex2 & operator=(const UserAlphabetIndex2 &uAlph)
std::shared_ptr< const Alphabet > alph_
UserAlphabetIndex2(const UserAlphabetIndex2 &uAlph)
LinearMatrix< double > index_
UserAlphabetIndex2 * clone() const
const Alphabet & alphabet() const
Get the alphabet associated to this index.
virtual ~UserAlphabetIndex2()
Alphabet index given by user.
UserAlphabetIndex2(std::shared_ptr< const Alphabet > alph, const Matrix< double > &mat)
Two dimensionnal alphabet index interface.
double getIndex(int state1, int state2) const
Get the index associated to a pair of states.
LinearMatrix< double > * getIndexMatrix() const
double getIndex(const std::string &state1, const std::string &state2) const
Get the index associated to a pair of states.