Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for needsResizing (0.2 sec)

  1. android/guava/src/com/google/common/collect/Hashing.java

        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) {
        return size > loadFactor * tableSize && tableSize < MAX_TABLE_SIZE;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/Hashing.java

        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) {
        return size > loadFactor * tableSize && tableSize < MAX_TABLE_SIZE;
      }
    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. guava/src/com/google/common/collect/HashBiMap.java

        }
        rehashIfNecessary();
        return Maps.keyOrNull(oldEntryForValue);
      }
    
      private void rehashIfNecessary() {
        @Nullable BiEntry<K, V>[] oldKToV = hashTableKToV;
        if (Hashing.needsResizing(size, oldKToV.length, LOAD_FACTOR)) {
          int newTableSize = oldKToV.length * 2;
    
          this.hashTableKToV = createTable(newTableSize);
          this.hashTableVToK = createTable(newTableSize);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 24.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/LinkedHashMultimapTest.java

          LinkedHashMultimap<String, Integer>.ValueSet valueSet =
              (LinkedHashMultimap.ValueSet) multimap.backingMap().get("a");
          assertEquals(z, valueSet.size());
          assertFalse(
              Hashing.needsResizing(
                  valueSet.size(),
                  valueSet.hashTable.length,
                  LinkedHashMultimap.VALUE_SET_LOAD_FACTOR));
        }
      }
    
      private Multimap<String, Integer> initializeMultimap5() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/LinkedHashMultimap.java

          hashTable[bucket] = newEntry;
          size++;
          modCount++;
          rehashIfNecessary();
          return true;
        }
    
        private void rehashIfNecessary() {
          if (Hashing.needsResizing(size, hashTable.length, VALUE_SET_LOAD_FACTOR)) {
            @SuppressWarnings("unchecked")
            ValueEntry<K, V>[] hashTable =
                (ValueEntry<K, V>[]) new ValueEntry<?, ?>[this.hashTable.length * 2];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 24.3K bytes
    - Viewed (0)
Back to top