protected double calculateDistance(PWMWithThreshold first, PWMWithThreshold second) throws HashOverflowException {
CompareModelsCountsGiven calc;
CompareModelsCountsGiven.SimilarityInfo info;
calc = calculator(first.pwm, second.pwm);
info = calc.jaccard(first.roughThreshold, second.roughThreshold,
first.roughCount, second.roughCount);
if (preciseRecalculationCutoff != null && info.similarity() > preciseRecalculationCutoff) {
calc = calculator(first.pwm, second.pwm);
info = calc.jaccard(first.preciseThreshold, second.preciseThreshold,
first.preciseCount, second.preciseCount);