Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testOptimalSize (0.06 seconds)

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

      public void testOptimalNumOfHashFunctionsRounding() {
        assertEquals(5, BloomFilter.optimalNumOfHashFunctions(0.03));
      }
    
      /** Tests that we always get a non-negative optimal size. */
      public void testOptimalSize() {
        for (int n = 1; n < 1000; n++) {
          for (double fpp = Double.MIN_VALUE; fpp < 1.0; fpp += 0.001) {
            assertThat(BloomFilter.optimalNumOfBits(n, fpp)).isAtLeast(0);
          }
        }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 18:19:59 GMT 2025
    - 22.1K bytes
    - Click Count (0)
Back to Top