- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for chooseTableSize (1.22 sec)
-
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 14.1K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Nov 07 16:09:47 UTC 2025 - 35.3K bytes - Viewed (0)