14 distanceMatrix_(4, 4),
41 if (!
alpha_->isUnresolved(state1) && !
alpha_->isUnresolved(state2))
43 alpha_->getStateIndex(state1) - 1,
44 alpha_->getStateIndex(state2) - 1);
46 vector<int> states1 =
alpha_->getAlias(state1);
47 vector<int> states2 =
alpha_->getAlias(state2);
50 for (
size_t i = 0; i < states1.size(); i++)
52 for (
size_t j = 0; j < states2.size(); j++)
54 tmp_score =
getIndex(states1[i], states2[j]);
55 if (tmp_score > score)
59 return score /
static_cast<double>(states1.size() + states2.size() - 1);
65 alpha_->getStateIndex(state1) - 1,
66 alpha_->getStateIndex(state2) - 1);
double getIndex(int state1, int state2) const override
Get the index associated to a pair of states.
LinearMatrix< double > distanceMatrix_
std::shared_ptr< const NucleicAlphabet > alpha_
const Matrix< double > & getIndexMatrix() const override
The abstract base class for nucleic alphabets.
This alphabet is used to deal NumericAlphabet.