- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for mapToLong (0.07 sec)
-
guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
} public void testAddAllPrimitiveLongStream() { StatsAccumulator accumulator = new StatsAccumulator(); accumulator.addAll(megaPrimitiveDoubleStreamPart1().mapToLong(x -> (long) x)); accumulator.addAll(megaPrimitiveDoubleStreamPart2().mapToLong(x -> (long) x)); assertThat(accumulator.count()).isEqualTo(MEGA_STREAM_COUNT); assertThat(accumulator.mean()).isWithin(ALLOWED_ERROR * MEGA_STREAM_COUNT).of(MEGA_STREAM_MEAN);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 36.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
} public void testAddAllPrimitiveLongStream() { StatsAccumulator accumulator = new StatsAccumulator(); accumulator.addAll(megaPrimitiveDoubleStreamPart1().mapToLong(x -> (long) x)); accumulator.addAll(megaPrimitiveDoubleStreamPart2().mapToLong(x -> (long) x)); assertThat(accumulator.count()).isEqualTo(MEGA_STREAM_COUNT); assertThat(accumulator.mean()).isWithin(ALLOWED_ERROR * MEGA_STREAM_COUNT).of(MEGA_STREAM_MEAN);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 36.8K bytes - Viewed (0) -
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() { return map.values().stream().mapToLong(Long::longValue).sum(); } @LazyInit @CheckForNull private transient Map<K, Long> asMap; /** Returns a live, read-only view of the map backing this {@code AtomicLongMap}. */ public Map<K, Long> asMap() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableLongArray.java
* <li>Can be queried without allocating garbage. * <li>Access to {@code LongStream} features (like {@link LongStream#sum}) using {@code stream()} * instead of the awkward {@code stream().mapToLong(v -> v)}. * </ul> * * <p>Disadvantages compared to {@code ImmutableList<Long>}: * * <ul> * <li>Can't be passed directly to methods that expect {@code Iterable}, {@code Collection}, or
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 22.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/StatsTest.java
assertThat(stats.min()).isEqualTo(MEGA_STREAM_MIN); assertThat(stats.max()).isEqualTo(MEGA_STREAM_MAX); } public void testOfPrimitiveLongStream() { Stats stats = Stats.of(megaPrimitiveDoubleStream().mapToLong(x -> (long) x)); assertThat(stats.count()).isEqualTo(MEGA_STREAM_COUNT); assertThat(stats.mean()).isWithin(ALLOWED_ERROR * MEGA_STREAM_COUNT).of(MEGA_STREAM_MEAN); assertThat(stats.populationVariance())
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 33.3K bytes - Viewed (0)