49 SimpleScore::SimpleScore(
const Alphabet* alphabet,
double match,
double mismatch) :
50 distanceMatrix_(alphabet->getSize(), alphabet->getSize()),
55 for (
unsigned int i = 0; i < n; i++)
57 for (
unsigned int j = 0; j < n; j++)
67 if (state1 < 0 || state1 > (
int)alphabet_->getSize())
68 throw BadIntException(state1,
"SimpleScore::getIndex(). Invalid state1.", alphabet_);
69 if (state2 < 0 || state2 > (
int)alphabet_->getSize())
70 throw BadIntException(state2,
"SimpleScore::getIndex(). Invalid state2.", alphabet_);
71 return distanceMatrix_(state1, state2);
77 return distanceMatrix_(alphabet_->charToInt(state1), alphabet_->charToInt(state2));