- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 92 for Sum (0.13 sec)
-
android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java
@Benchmark int hashMultiset(int reps) { int sum = 0; for (int i = 0; i < reps; i++) { for (Object value : hashMultiset) { sum += value.hashCode(); } } return sum; } @Benchmark int linkedHashMultiset(int reps) { int sum = 0; for (int i = 0; i < reps; i++) { for (Object value : linkedHashMultiset) { sum += value.hashCode(); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/PowerSetBenchmark.java
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 1.4K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/AbstractCache.java
return new CacheStats( negativeToMaxValue(hitCount.sum()), negativeToMaxValue(missCount.sum()), negativeToMaxValue(loadSuccessCount.sum()), negativeToMaxValue(loadExceptionCount.sum()), negativeToMaxValue(totalLoadTime.sum()), negativeToMaxValue(evictionCount.sum())); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 15 18:00:07 GMT 2021 - 9.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java
} } } /** * Returns the sum of all values in this map. * * <p>This method is not atomic: the sum may or may not include other concurrent operations. */ public long sum() { long sum = 0L; for (AtomicLong value : map.values()) { sum = sum + value.get(); } return sum; } @LazyInit @CheckForNull private transient Map<K, Long> asMap;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.1K bytes - Viewed (0) -
android/guava/src/com/google/common/math/PairedStatsAccumulator.java
// We define the arithmetic means X_n = 1/n \sum_{i=1}^n x_i, and Y_n = 1/n \sum_{i=1}^n y_i. // We also define the sum of the products of the differences from the means // C_n = \sum_{i=1}^n x_i y_i - n X_n Y_n // for all n >= 1. Then for all n > 1: // C_{n-1} = \sum_{i=1}^{n-1} x_i y_i - (n-1) X_{n-1} Y_{n-1}
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 12 17:02:53 GMT 2023 - 10.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheStatsTest.java
CacheStats sum = two.plus(one); assertEquals(124, sum.requestCount()); assertEquals(64, sum.hitCount()); assertEquals(64.0 / 124, sum.hitRate()); assertEquals(60, sum.missCount()); assertEquals(60.0 / 124, sum.missRate()); assertEquals(56, sum.loadSuccessCount()); assertEquals(52, sum.loadExceptionCount()); assertEquals(52.0 / 108, sum.loadExceptionRate());
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Sun Jun 30 14:58:49 GMT 2019 - 4.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
public void testSum() { assertThat(emptyAccumulator.sum()).isWithin(0.0).of(0.0); assertThat(emptyAccumulatorByAddAllEmptyIterable.sum()).isWithin(0.0).of(0.0); assertThat(emptyAccumulatorByAddAllEmptyStats.sum()).isWithin(0.0).of(0.0); assertThat(oneValueAccumulator.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); assertThat(oneValueAccumulatorByAddAllEmptyStats.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 36.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/StatsTest.java
} public void testSum() { assertThat(EMPTY_STATS_VARARGS.sum()).isEqualTo(0.0); assertThat(EMPTY_STATS_ITERABLE.sum()).isEqualTo(0.0); assertThat(ONE_VALUE_STATS.sum()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); assertThat(TWO_VALUES_STATS.sum()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN * 2); assertThat(MANY_VALUES_STATS_VARARGS.sum()) .isWithin(ALLOWED_ERROR)
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Nov 09 22:49:56 GMT 2023 - 32.1K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleMath.java
// this case only, we can compute the sum as a long without risking overflow or loss of // precision. So we do that, as it's slightly quicker than the Knuth algorithm. long sum = 0; for (int index = 0; index < values.length; ++index) { sum += values[index]; } return (double) sum / values.length; } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 18.9K bytes - Viewed (0)