- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 60 for pojer (0.12 sec)
-
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} } // Relies on the correctness of isPowerOfTwo(BigInteger). public void testLog2Exact() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { // We only expect an exception if x was not a power of 2. boolean isPowerOf2 = BigIntegerMath.isPowerOfTwo(x); try { assertEquals(x, ZERO.setBit(BigIntegerMath.log2(x, UNNECESSARY))); assertTrue(isPowerOf2);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/AbstractHashFloodingTest.java
abstract double expectedAsymptotic(int n); } /** * Returns a list of objects with the same hash code, of size 2^power, counting calls to equals, * hashCode, and compareTo in counter. */ static List<CountsHashCodeAndEquals> createAdversarialInput(int power, CallsCounter counter) { String str1 = "Aa"; String str2 = "BB"; assertEquals(str1.hashCode(), str2.hashCode());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 03 21:01:39 GMT 2023 - 8.6K bytes - Viewed (0) -
guava/src/com/google/common/cache/Striped64.java
@ElementTypesAreNonnullByDefault abstract class Striped64 extends Number { /* * This class maintains a lazily-initialized table of atomically * updated variables, plus an extra "base" field. The table size * is a power of two. Indexing uses masked per-thread hash codes. * Nearly all declarations in this class are package-private, * accessed directly by subclasses. * * Table entries are of class Cell; a variant of AtomicLong padded
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
@GwtCompatible(emulated = true) public class IntMathTest extends TestCase { public void testMaxSignedPowerOfTwo() { assertTrue(IntMath.isPowerOfTwo(IntMath.MAX_SIGNED_POWER_OF_TWO)); // Extra work required to make GWT happy. long value = IntMath.MAX_SIGNED_POWER_OF_TWO * 2L; assertFalse(IntMath.isPowerOfTwo((int) value)); } public void testCeilingPowerOfTwo() { for (int x : POSITIVE_INTEGER_CANDIDATES) {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 24.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/SetContainsBenchmark.java
* * @author Kevin Bourrillion */ public class SetContainsBenchmark { // Start at 4.88 then multiply by 2*2^phi <evil cackle> - The goal is be uniform // yet visit a variety of "values-relative-to-the-next-power-of-2" @Param({"5", "30", "180", "1100", "6900", "43000", "260000"}) // "1600000", "9800000" private int size; // TODO(kevinb): look at exact (==) hits vs. equals() hits? @Param({"0.2", "0.8"})
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/SetContainsBenchmark.java
* * @author Kevin Bourrillion */ public class SetContainsBenchmark { // Start at 4.88 then multiply by 2*2^phi <evil cackle> - The goal is be uniform // yet visit a variety of "values-relative-to-the-next-power-of-2" @Param({"5", "30", "180", "1100", "6900", "43000", "260000"}) // "1600000", "9800000" private int size; // TODO(kevinb): look at exact (==) hits vs. equals() hits? @Param({"0.2", "0.8"})
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
static AtomicLong requests = new AtomicLong(0); static AtomicLong misses = new AtomicLong(0); @BeforeExperiment void setUp() { // random integers will be generated in this range, then raised to the // power of (1/concentration) and floor()ed max = Ints.checkedCast((long) Math.pow(distinctKeys, concentration)); cache = CacheBuilder.newBuilder() .concurrencyLevel(segments)
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
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;
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 35.4K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleUtils.java
static boolean isFinite(double d) { return getExponent(d) <= MAX_EXPONENT; } static boolean isNormal(double d) { return getExponent(d) >= MIN_EXPONENT; } /* * Returns x scaled by a power of 2 such that it is in the range [1, 2). Assumes x is positive, * normal, and finite. */ static double scaleNormalize(double x) { long significand = doubleToRawLongBits(x) & SIGNIFICAND_MASK;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 28 15:37:52 GMT 2021 - 5.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
} public void testCountOverflow_doesNotThrow() { StatsAccumulator accumulator = new StatsAccumulator(); accumulator.add(ONE_VALUE); for (int power = 1; power < Long.SIZE - 1; power++) { accumulator.addAll(accumulator.snapshot()); } // Should overflow without throwing. accumulator.addAll(accumulator.snapshot()); assertThat(accumulator.count()).isLessThan(0L);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 34K bytes - Viewed (0)