- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for powers (0.04 sec)
-
android/guava-tests/test/com/google/common/math/MathTesting.java
static { ImmutableSet.Builder<Integer> intValues = ImmutableSet.builder(); // Add boundary values manually to avoid over/under flow (this covers 2^N for 0 and 31). intValues.add(Integer.MAX_VALUE - 1, Integer.MAX_VALUE); // Add values up to 40. This covers cases like "square of a prime" and such. for (int i = 1; i <= 40; i++) { intValues.add(i); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 11.3K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
/** * Returns the smallest power of two greater than or equal to {@code x}. This is equivalent to * {@code checkedPow(2, log2(x, CEILING))}. * * @throws IllegalArgumentException if {@code x <= 0} * @throws ArithmeticException of the next-higher power of two is not representable as a {@code * long}, i.e. when {@code x > 2^62} * @since 20.0 */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
* @return the power set, as an immutable set of immutable sets * @throws IllegalArgumentException if {@code set} has more than 30 unique elements (causing the * power set size to exceed the {@code int} range) * @throws NullPointerException if {@code set} is or contains {@code null} * @see <a href="http://en.wikipedia.org/wiki/Power_set">Power set article at Wikipedia</a>
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 81.6K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* {@link LongMath} respectively. * * @author Louis Wasserman * @since 11.0 */ @GwtCompatible public final class BigIntegerMath { /** * Returns the smallest power of two greater than or equal to {@code x}. This is equivalent to * {@code BigInteger.valueOf(2).pow(log2(x, CEILING))}. * * @throws IllegalArgumentException if {@code x <= 0} * @since 20.0 */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
SetBuilderImpl<E> copy() { return this; } @Override ImmutableSet<E> build() { return ImmutableSet.of(); } } // We use power-of-2 tables, and this is the highest int that's a power of 2 static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; // Represents how tightly we can pack things, as a maximum. private static final double DESIRED_LOAD_FACTOR = 0.7;
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-tests/test/com/google/common/collect/SetsTest.java
Set<Set<Integer>> powerSet = powerSet(elements); assertEquals(1, powerSet.size()); assertEquals(ImmutableSet.of(ImmutableSet.of()), powerSet); assertEquals(0, powerSet.hashCode()); } public void testPowerSetContents() { ImmutableSet<Integer> elements = ImmutableSet.of(1, 2, 3); Set<Set<Integer>> powerSet = powerSet(elements); assertEquals(8, powerSet.size());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 45.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} } } /* Relies on the correctness of isPowerOfTwo(long). */ public void testLog2Exact() { for (long x : POSITIVE_LONG_CANDIDATES) { // We only expect an exception if x was not a power of 2. boolean isPowerOf2 = LongMath.isPowerOfTwo(x); try { assertEquals(x, 1L << LongMath.log2(x, UNNECESSARY)); assertTrue(isPowerOf2); } catch (ArithmeticException e) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 31.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} } } // Relies on the correctness of isPowerOfTwo(int). public void testLog2Exact() { for (int x : POSITIVE_INTEGER_CANDIDATES) { // We only expect an exception if x was not a power of 2. boolean isPowerOf2 = IntMath.isPowerOfTwo(x); try { assertEquals(x, 1 << IntMath.log2(x, UNNECESSARY)); assertTrue(isPowerOf2); } catch (ArithmeticException e) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java
public void testContainsAll() { ImmutableSortedSet<Integer> set = ContiguousSet.create(Range.closed(1, 3), integers()); for (Set<Integer> subset : Sets.powerSet(ImmutableSet.of(1, 2, 3))) { assertTrue(set.containsAll(subset)); } for (Set<Integer> subset : Sets.powerSet(ImmutableSet.of(1, 2, 3))) { assertFalse(set.containsAll(Sets.union(subset, ImmutableSet.of(9)))); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 19.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/TreeRangeSet.java
* firstComplementRangeLowerBound is the first complement range lower bound inside * complementLowerBoundWindow. Complement range lower bounds are either positive range upper * bounds, or Cut.belowAll(). * * positiveItr starts at the first positive range with lower bound greater than * firstComplementRangeLowerBound. (Positive range lower bounds correspond to complement range * upper bounds.)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 32.3K bytes - Viewed (0)