- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for highestOneBit (0.18 sec)
-
guava/src/com/google/common/collect/Hashing.java
// Get the recommended table size. // Round down to the nearest power of 2. expectedEntries = Math.max(expectedEntries, 2); 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;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Aug 05 00:40:25 UTC 2021 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Hashing.java
// Get the recommended table size. // Round down to the nearest power of 2. expectedEntries = Math.max(expectedEntries, 2); 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;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Aug 05 00:40:25 UTC 2021 - 2.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java
} } } private static String mikeRepeat(String string, int count) { final int len = string.length(); char[] strCopy = new char[len * Integer.highestOneBit(count)]; string.getChars(0, len, strCopy, 0); char[] array = new char[len * count]; int strCopyLen = len; int pos = 0; while (count != 0) { if ((count & 1) != 0) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Sep 17 20:24:24 UTC 2021 - 3.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java
} } } private static String mikeRepeat(String string, int count) { final int len = string.length(); char[] strCopy = new char[len * Integer.highestOneBit(count)]; string.getChars(0, len, strCopy, 0); char[] array = new char[len * count]; int strCopyLen = len; int pos = 0; while (count != 0) { if ((count & 1) != 0) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Sep 17 20:24:24 UTC 2021 - 3.3K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableCollection.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 23 18:43:40 UTC 2024 - 5K bytes - Viewed (0) -
guava/src/com/google/common/base/SmallCharMatcher.java
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. int tableSize = Integer.highestOneBit(setSize - 1) << 1; while (tableSize * DESIRED_LOAD_FACTOR < setSize) { tableSize <<= 1; } return tableSize; } static CharMatcher from(BitSet chars, String description) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Feb 09 15:49:48 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/SmallCharMatcher.java
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. int tableSize = Integer.highestOneBit(setSize - 1) << 1; while (tableSize * DESIRED_LOAD_FACTOR < setSize) { tableSize <<= 1; } return tableSize; } static CharMatcher from(BitSet chars, String description) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Feb 09 15:49:48 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashing.java
} /** Creates and returns a properly-sized array with the given number of buckets. */ static Object createTable(int buckets) { if (buckets < 2 || buckets > Ints.MAX_POWER_OF_TWO || Integer.highestOneBit(buckets) != buckets) { throw new IllegalArgumentException("must be power of 2 between 2^1 and 2^30: " + buckets); } if (buckets <= BYTE_MAX_SIZE) { return new byte[buckets];
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Aug 02 21:41:22 UTC 2021 - 7.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/CompactHashing.java
} /** Creates and returns a properly-sized array with the given number of buckets. */ static Object createTable(int buckets) { if (buckets < 2 || buckets > Ints.MAX_POWER_OF_TWO || Integer.highestOneBit(buckets) != buckets) { throw new IllegalArgumentException("must be power of 2 between 2^1 and 2^30: " + buckets); } if (buckets <= BYTE_MAX_SIZE) { return new byte[buckets];
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Aug 02 21:41:22 UTC 2021 - 7.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ObjectCountHashMap.java
} void ensureCapacity(int minCapacity) { if (minCapacity > entries.length) { resizeEntries(minCapacity); } if (minCapacity >= threshold) { int newTableSize = Math.max(2, Integer.highestOneBit(minCapacity - 1) << 1); resizeTable(newTableSize); } } @CanIgnoreReturnValue public int put(@ParametricNullness K key, int value) { checkPositive(value, "count");
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jun 01 22:07:10 UTC 2021 - 15K bytes - Viewed (0)