Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for tableSize (0.27 sec)

  1. guava-tests/benchmark/com/google/common/collect/ImmutableSetHashFloodingDetectionBenchmark.java

      private static final Object[][] tables = new Object[TEST_CASES][];
    
      @BeforeExperiment
      public void setUp() {
        int tableSize = ImmutableSet.chooseTableSize(size);
        int mask = tableSize - 1;
        for (int i = 0; i < TEST_CASES; i++) {
          tables[i] = new Object[tableSize];
          for (int j = 0; j < size; j++) {
            Object o = new Object();
            for (int k = o.hashCode(); ; k++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jun 03 20:16:35 UTC 2021
    - 6.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Hashing.java

        int tableSize = Integer.highestOneBit(expectedEntries);
        // Check to make sure that we will not exceed the maximum load factor.
        if (expectedEntries > (int) (loadFactor * tableSize)) {
          tableSize <<= 1;
          return (tableSize > 0) ? tableSize : MAX_TABLE_SIZE;
        }
        return tableSize;
      }
    
      static boolean needsResizing(int size, int tableSize, double loadFactor) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Hashing.java

        int tableSize = Integer.highestOneBit(expectedEntries);
        // Check to make sure that we will not exceed the maximum load factor.
        if (expectedEntries > (int) (loadFactor * tableSize)) {
          tableSize <<= 1;
          return (tableSize > 0) ? tableSize : MAX_TABLE_SIZE;
        }
        return tableSize;
      }
    
      static boolean needsResizing(int size, int tableSize, double loadFactor) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/RegularImmutableBiMap.java

        this.size = size;
        this.keyOffset = 0;
        int tableSize = (size >= 2) ? ImmutableSet.chooseTableSize(size) : 0;
        this.keyHashTable =
            RegularImmutableMap.createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 0);
        Object valueHashTable =
            RegularImmutableMap.createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 1);
        this.inverse =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/CompactLinkedHashMap.java

        int expectedSize = super.allocArrays();
        this.links = new long[expectedSize];
        return expectedSize;
      }
    
      @Override
      Map<K, V> createHashFloodingResistantDelegate(int tableSize) {
        return new LinkedHashMap<>(tableSize, 1.0f, accessOrder);
      }
    
      @Override
      @CanIgnoreReturnValue
      Map<K, V> convertToHashFloodingResistantImplementation() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/CompactHashing.java

      /**
       * Returns the power of 2 hashtable size required to hold the expected number of items or the
       * minimum hashtable size, whichever is greater.
       */
      static int tableSize(int expectedSize) {
        // We use entries next == 0 to indicate UNSET, so actual capacity is 1 less than requested.
        return max(MIN_HASH_TABLE_SIZE, Hashing.closedTableSize(expectedSize + 1, 1.0));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 15:34:52 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/CompactHashing.java

      /**
       * Returns the power of 2 hashtable size required to hold the expected number of items or the
       * minimum hashtable size, whichever is greater.
       */
      static int tableSize(int expectedSize) {
        // We use entries next == 0 to indicate UNSET, so actual capacity is 1 less than requested.
        return max(MIN_HASH_TABLE_SIZE, Hashing.closedTableSize(expectedSize + 1, 1.0));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 15:34:52 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top