- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for chooseTableSize (0.05 sec)
-
android/guava/src/com/google/common/base/SmallCharMatcher.java
* with linear probing in its implementation. The returned size is the smallest power of two that * can hold setSize elements with the desired load factor. */ @VisibleForTesting static int chooseTableSize(int setSize) { if (setSize == 1) { return 2; } // Correct the size for open addressing to match desired load factor. // Round up to the next highest power of 2.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 03:49:18 UTC 2025 - 4.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java
} @GwtIncompatible // ImmutableSet.chooseTableSize public void testChooseTableSize() { assertEquals(8, ImmutableSet.chooseTableSize(3)); assertEquals(8, ImmutableSet.chooseTableSize(4)); assertEquals(1 << 29, ImmutableSet.chooseTableSize(1 << 28)); assertEquals(1 << 29, ImmutableSet.chooseTableSize((1 << 29) * 3 / 5)); // Now we hit the cap
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 14.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableSetTest.java
} @GwtIncompatible // ImmutableSet.chooseTableSize public void testChooseTableSize() { assertEquals(8, ImmutableSet.chooseTableSize(3)); assertEquals(8, ImmutableSet.chooseTableSize(4)); assertEquals(1 << 29, ImmutableSet.chooseTableSize(1 << 28)); assertEquals(1 << 29, ImmutableSet.chooseTableSize((1 << 29) * 3 / 5)); // Now we hit the cap
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 14.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableBiMap.java
this.alternatingKeysAndValues = alternatingKeysAndValues; this.size = size; this.keyOffset = 0; int tableSize = (size >= 2) ? ImmutableSet.chooseTableSize(size) : 0; this.keyHashTable = createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 0); Object valueHashTable = createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 1); this.inverse =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 4.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
* can hold setSize elements with the desired load factor. Always returns at least setSize + 2. */ // TODO(cpovirk): Move to Hashing or something, since it's used elsewhere in the Android version. static int chooseTableSize(int setSize) { setSize = max(setSize, 2); // Correct the size for open addressing to match desired load factor. if (setSize < CUTOFF) { // Round up to the next highest power of 2.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableMap.java
return new RegularImmutableMap<K, V>(null, alternatingKeysAndValues, 1); } checkPositionIndex(n, alternatingKeysAndValues.length >> 1); int tableSize = ImmutableSet.chooseTableSize(n); // If there are no duplicate keys, hashTablePlus is the final hashTable value. If there *are* // duplicate keys, hashTablePlus consists of 3 elements: [0] the hashTable; [1] the number of
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 22.5K bytes - Viewed (0)