static int levenSimilarityIntIC_multi(S a, Cl b) { if (empty(b)) ret 0; new Lowest bestRelDiff; // 0 to 1 for (S key : b) { int n = max(l(a), l(key)); if (!bestRelDiff.has()) bestRelDiff.put(key, doubleRatio(levenIC(a, key), n)); else { int limit = iceil(bestRelDiff.score*n); int diff = leven_limitedIC(a, key, limit); double percentDiff = doubleRatio(diff*100, n); bestRelDiff.put(key, doubleRatio(diff, n)); } } ret iround((1-bestRelDiff.score)*100); }