- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for multiplyExact (0.13 seconds)
-
android/guava/src/com/google/common/math/LongMath.java
* * <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated; use {@link * Math#multiplyExact(long, long)} instead. Note that if both arguments are {@code int} values, * writing {@code Math.multiplyExact(a, b)} will call the {@link Math#multiplyExact(int, int)} * overload, not {@link Math#multiplyExact(long, long)}. Also note that multiplying two {@codeCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 09 23:01:02 GMT 2026 - 46.8K bytes - Click Count (0) -
android/guava/src/com/google/common/math/IntMath.java
* Math#multiplyExact(int, int)} instead. * * @throws ArithmeticException if {@code a * b} overflows in signed {@code int} arithmetic */ @InlineMe(replacement = "Math.multiplyExact(a, b)") public static int checkedMultiply(int a, int b) { return Math.multiplyExact(a, b); } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 26.1K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/CartesianList.java
this.axes = axes; int[] axesSizeProduct = new int[axes.size() + 1]; axesSizeProduct[axes.size()] = 1; try { for (int i = axes.size() - 1; i >= 0; i--) { axesSizeProduct[i] = Math.multiplyExact(axesSizeProduct[i + 1], axes.get(i).size()); } } catch (ArithmeticException e) { throw new IllegalArgumentException( "Cartesian product too large; must have size at most Integer.MAX_VALUE"); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 31 13:15:26 GMT 2025 - 4.7K bytes - Click Count (0) -
guava/src/com/google/common/collect/CartesianList.java
this.axes = axes; int[] axesSizeProduct = new int[axes.size() + 1]; axesSizeProduct[axes.size()] = 1; try { for (int i = axes.size() - 1; i >= 0; i--) { axesSizeProduct[i] = Math.multiplyExact(axesSizeProduct[i + 1], axes.get(i).size()); } } catch (ArithmeticException e) { throw new IllegalArgumentException( "Cartesian product too large; must have size at most Integer.MAX_VALUE"); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 31 13:15:26 GMT 2025 - 4.7K bytes - Click Count (0) -
guava/src/com/google/common/collect/TopKSelector.java
this.k = k; checkArgument(k >= 0, "k (%s) must be >= 0", k); checkArgument(k <= Integer.MAX_VALUE / 2, "k (%s) must be <= Integer.MAX_VALUE / 2", k); this.buffer = (T[]) new Object[Math.multiplyExact(k, 2)]; this.bufferSize = 0; this.threshold = null; } /** * Adds {@code elem} as a candidate for the top {@code k} elements. This operation takes amortized * O(1) time. */Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 31 13:15:26 GMT 2025 - 11.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/TopKSelector.java
this.k = k; checkArgument(k >= 0, "k (%s) must be >= 0", k); checkArgument(k <= Integer.MAX_VALUE / 2, "k (%s) must be <= Integer.MAX_VALUE / 2", k); this.buffer = (T[]) new Object[Math.multiplyExact(k, 2)]; this.bufferSize = 0; this.threshold = null; } /** * Adds {@code elem} as a candidate for the top {@code k} elements. This operation takes amortized * O(1) time. */Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Aug 31 13:15:26 GMT 2025 - 11.3K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java
/** Returns ~2x the old capacity if small; ~1.5x otherwise. */ private int calculateNewCapacity() { int oldCapacity = queue.length; int newCapacity = (oldCapacity < 64) ? (oldCapacity + 1) * 2 : Math.multiplyExact(oldCapacity / 2, 3); return capAtMaximumSize(newCapacity, maximumSize); } /** There's no reason for the queueSize to ever be more than maxSize + 1 */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 13:11:08 GMT 2026 - 34K bytes - Click Count (0) -
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
/** Returns ~2x the old capacity if small; ~1.5x otherwise. */ private int calculateNewCapacity() { int oldCapacity = queue.length; int newCapacity = (oldCapacity < 64) ? (oldCapacity + 1) * 2 : Math.multiplyExact(oldCapacity / 2, 3); return capAtMaximumSize(newCapacity, maximumSize); } /** There's no reason for the queueSize to ever be more than maxSize + 1 */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 13:11:08 GMT 2026 - 34K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/BloomFilter.java
*/ @SuppressWarnings("EnumOrdinal") Strategy strategy = BloomFilterStrategies.values()[strategyOrdinal]; LockFreeBitArray dataArray = new LockFreeBitArray(Math.multiplyExact(dataLength, 64L)); for (int i = 0; i < dataLength; i++) { dataArray.putData(i, din.readLong()); } return new BloomFilter<>(dataArray, numHashFunctions, funnel, strategy);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 10 22:28:12 GMT 2026 - 27.6K bytes - Click Count (0)