Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for tableSize (0.11 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/RegularImmutableMap.java

          return null;
        }
        int mask = tableSize - 1;
        Builder.DuplicateKey duplicateKey = null;
        if (tableSize <= BYTE_MAX_SIZE) {
          /*
           * Use 8 bits per entry. The value is unsigned to allow use up to a size of 2^8.
           *
           * The absent indicator of -1 signed becomes 2^8 - 1 unsigned, which reduces the actual max
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/RegularImmutableBiMap.java

        checkPositionIndex(n, entryArray.length);
        int tableSize = Hashing.closedTableSize(n, MAX_LOAD_FACTOR);
        int mask = tableSize - 1;
        @Nullable ImmutableMapEntry<K, V>[] keyTable = createEntryArray(tableSize);
        @Nullable ImmutableMapEntry<K, V>[] valueTable = createEntryArray(tableSize);
        /*
         * The cast is safe: n==entryArray.length means that we have filled the whole array with Entry
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  6. 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)
  7. guava/src/com/google/common/collect/RegularImmutableMap.java

        Entry<K, V>[] entries =
            (n == entryArray.length) ? (Entry<K, V>[]) entryArray : createEntryArray(n);
        int tableSize = Hashing.closedTableSize(n, MAX_LOAD_FACTOR);
        @Nullable ImmutableMapEntry<K, V>[] table = createEntryArray(tableSize);
        int mask = tableSize - 1;
        // If duplicates are allowed, this IdentityHashMap will record the final Entry for each
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/HashBiMap.java

        checkNonnegative(expectedSize, "expectedSize");
        int tableSize = Hashing.closedTableSize(expectedSize, LOAD_FACTOR);
        this.hashTableKToV = createTable(tableSize);
        this.hashTableVToK = createTable(tableSize);
        this.firstInKeyInsertionOrder = null;
        this.lastInKeyInsertionOrder = null;
        this.size = 0;
        this.mask = tableSize - 1;
        this.modCount = 0;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 13 14:11:58 UTC 2023
    - 24.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/CompactHashSet.java

      Set<E> delegateOrNull() {
        if (table instanceof Set) {
          return (Set<E>) table;
        }
        return null;
      }
    
      private Set<E> createHashFloodingResistantDelegate(int tableSize) {
        return new LinkedHashSet<>(tableSize, 1.0f);
      }
    
      @CanIgnoreReturnValue
      Set<E> convertToHashFloodingResistantImplementation() {
        Set<E> newDelegate = createHashFloodingResistantDelegate(hashTableMask() + 1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 24K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/CompactHashSet.java

      Set<E> delegateOrNull() {
        if (table instanceof Set) {
          return (Set<E>) table;
        }
        return null;
      }
    
      private Set<E> createHashFloodingResistantDelegate(int tableSize) {
        return new LinkedHashSet<>(tableSize, 1.0f);
      }
    
      @CanIgnoreReturnValue
      Set<E> convertToHashFloodingResistantImplementation() {
        Set<E> newDelegate = createHashFloodingResistantDelegate(hashTableMask() + 1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 24.9K bytes
    - Viewed (0)
Back to top