- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 766 for zeros (0.15 sec)
-
guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java
long blah = 0; for (int i = 0; i < reps; i++) { Integer key = keys.get(random.nextInt(nKeys)); // This range is [-5, 4] - slight negative bias so we often hit zero, which brings the // auto-removal of zeroes into play. int delta = random.nextInt(10) - 5; blah += delta; if (delta >= 0) { multiset.add(key, delta); } else { multiset.remove(key, -delta);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed May 09 15:17:25 GMT 2018 - 16.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java
} finally { pool.shutdownNow(); } // Since we have access to the backing map, verify that there are no zeroes in the map for (AtomicInteger value : map.values()) { assertTrue("map should not contain a zero", value.get() != 0); } } private static class MutateTask implements Callable<int[]> { private final ConcurrentHashMultiset<String> multiset;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 5.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java
long blah = 0; for (int i = 0; i < reps; i++) { Integer key = keys.get(random.nextInt(nKeys)); // This range is [-5, 4] - slight negative bias so we often hit zero, which brings the // auto-removal of zeroes into play. int delta = random.nextInt(10) - 5; blah += delta; if (delta >= 0) { multiset.add(key, delta); } else { multiset.remove(key, -delta);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Apr 06 12:56:11 GMT 2023 - 16.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
* creation and removal (including automatic removal of zeroes). If the modification of an * AtomicInteger results in zero, we compareAndSet the value to zero; if that succeeds, we remove * the entry from the Map. If another operation sees a zero in the map, it knows that the entry is * about to be removed, so this operation may remove it (often by replacing it with a new
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 20.9K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InetAddresses.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Dec 15 19:31:54 GMT 2023 - 44K bytes - Viewed (1) -
android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionRetainAllTester.java
} // retainAll(empty) @CollectionFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(ZERO) public void testRetainAll_emptyPreviouslyEmpty() { expectReturnsFalse(empty); expectUnchanged(); } @CollectionFeature.Require(absent = SUPPORTS_REMOVE) @CollectionSize.Require(ZERO) public void testRetainAll_emptyPreviouslyEmptyUnsupported() { expectReturnsFalseOrThrows(empty);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 10.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
assertTrue(ZERO.setBit(result).compareTo(x) <= 0); assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0); } } } public void testLog2Ceiling() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { for (RoundingMode mode : asList(CEILING, UP)) { int result = BigIntegerMath.log2(x, mode); assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
assertTrue(ZERO.setBit(result).compareTo(x) <= 0); assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0); } } } public void testLog2Ceiling() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { for (RoundingMode mode : asList(CEILING, UP)) { int result = BigIntegerMath.log2(x, mode); assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapComputeTester.java
* limitations under the License. */ package com.google.common.collect.testing.testers; import static com.google.common.collect.testing.features.CollectionSize.ZERO; import static com.google.common.collect.testing.features.MapFeature.ALLOWS_NULL_KEYS; import static com.google.common.collect.testing.features.MapFeature.ALLOWS_NULL_VALUES;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Jan 09 20:10:38 GMT 2018 - 6.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java
@CollectionSize.Require(absent = ZERO) public void testAddAllAtIndex_supportedAllPresent() { assertTrue( "addAll(n, allPresent) should return true", getList().addAll(0, MinimalCollection.of(e0()))); expectAdded(0, e0()); } @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testAddAllAtIndex_unsupportedAllPresent() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 6.5K bytes - Viewed (1)