private static int computeNumberOfBandsForThreshold(int nHashes, double jaccardThreshold) {
        int bands = nHashes;
        while (bands > 1) {
            if ((nHashes % bands) == 0) {
                double threshold = Math.pow((double) 1.0 / bands, (double) bands / nHashes);
                if (threshold > jaccardThreshold) {
                    break;
                }
            }
            bands--;
        }
        return bands;
    }
Finds the number of bands that need to be used for a given similarity threshold.

@param nHashes
@param jaccardThreshold
@return
ache/src/main/java/achecrawler/minhash/LSH.java