Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for optimalNumOfBits (0.08 sec)

  1. guava-tests/test/com/google/common/hash/BloomFilterTest.java

          for (double fpp = Double.MIN_VALUE; fpp < 1.0; fpp += 0.001) {
            assertTrue(BloomFilter.optimalNumOfBits(n, fpp) >= 0);
          }
        }
    
        // some random values
        Random random = new Random(0);
        for (int repeats = 0; repeats < 10000; repeats++) {
          assertTrue(BloomFilter.optimalNumOfBits(random.nextInt(1 << 16), random.nextDouble()) >= 0);
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/BloomFilter.java

         * is proportional to -log(p), but there is not much of a point after all, e.g.
         * optimalM(1000, 0.0000000000000001) = 76680 which is less than 10kb. Who cares!
         */
        long numBits = optimalNumOfBits(expectedInsertions, fpp);
        int numHashFunctions = optimalNumOfHashFunctions(expectedInsertions, numBits);
        try {
          return new BloomFilter<>(new LockFreeBitArray(numBits), numHashFunctions, funnel, strategy);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 26.6K bytes
    - Viewed (0)
Back to top