5 #ifndef BPP_SEQ_ALPHABETINDEX_USERALPHABETINDEX2_H
6 #define BPP_SEQ_ALPHABETINDEX_USERALPHABETINDEX2_H
25 std::shared_ptr<const Alphabet>
alph_;
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);
Two dimensionnal alphabet index interface.
Alphabet index given by user.
virtual ~UserAlphabetIndex2()
void setIndexMatrix(const Matrix< double > &mat)
std::shared_ptr< const Alphabet > getAlphabet() const
Get the alphabet associated to this index.
UserAlphabetIndex2 & operator=(const UserAlphabetIndex2 &uAlph)
LinearMatrix< double > * getIndexMatrix() const
double getIndex(const std::string &state1, const std::string &state2) const
Get the index associated to a pair of states.
UserAlphabetIndex2(const UserAlphabetIndex2 &uAlph)
virtual bool isSymmetric() const
std::shared_ptr< const Alphabet > alph_
LinearMatrix< double > index_
UserAlphabetIndex2(std::shared_ptr< const Alphabet > alph, const Matrix< double > &mat)
UserAlphabetIndex2 * clone() const
double getIndex(int state1, int state2) const
Get the index associated to a pair of states.
const Alphabet & alphabet() const
Get the alphabet associated to this index.
This alphabet is used to deal NumericAlphabet.