/** * @return The minimum score the query could be assigned when aligned against any target sequence. */ @Override public double getMinScore() { // assume nothing about the matrix double score = 0; for (C queryC : query.getAsList()) { short min = Short.MAX_VALUE; for (Short value : matrix.getRow(queryC).values()) { if (value < min) min = value; } score += min; } return score; }
/** * @return The maximum score the query could be assigned when aligned against any target sequence. */ @Override public double getMaxScore() { // assume nothing about the matrix double score = 0; for (C queryC : query.getAsList()) { short max = Short.MIN_VALUE; for (Short value : matrix.getRow(queryC).values()) { if (value > max) max = value; } score += max; } return score; }