Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for mapToInt (0.05 sec)

  1. android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

      }
    
      public void testAddAllPrimitiveIntStream() {
        StatsAccumulator accumulator = new StatsAccumulator();
        accumulator.addAll(megaPrimitiveDoubleStreamPart1().mapToInt(x -> (int) x));
        accumulator.addAll(megaPrimitiveDoubleStreamPart2().mapToInt(x -> (int) x));
        assertThat(accumulator.count()).isEqualTo(MEGA_STREAM_COUNT);
        assertThat(accumulator.mean()).isWithin(ALLOWED_ERROR * MEGA_STREAM_COUNT).of(MEGA_STREAM_MEAN);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb/MultiChannelManager.java

         *
         * @return channel statistics
         */
        public ChannelStatistics getStatistics() {
            return new ChannelStatistics(sessionChannels.size(),
                    sessionChannels.values().stream().mapToInt(ChannelGroup::getChannelCount).sum(), totalRequests.get(),
                    totalChannelsCreated.get());
        }
    
        /**
         * Channel statistics.
         */
        public static class ChannelStatistics {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/primitives/ImmutableIntArray.java

     *   <li>Can be queried without allocating garbage.
     *   <li>Access to {@code IntStream} features (like {@link IntStream#sum}) using {@code stream()}
     *       instead of the awkward {@code stream().mapToInt(v -> v)}.
     * </ul>
     *
     * <p>Disadvantages compared to {@code ImmutableList<Integer>}:
     *
     * <ul>
     *   <li>Can't be passed directly to methods that expect {@code Iterable}, {@code Collection}, or
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  4. docs/smb3-features/03-multi-channel-design.md

                .orElseThrow();
        }
        
        private ChannelInfo selectWeightedRandom(Collection<ChannelInfo> channels) {
            // Calculate total weight
            int totalWeight = channels.stream()
                .mapToInt(ChannelInfo::getScore)
                .sum();
            
            if (totalWeight == 0) {
                // All channels have zero score, pick randomly
                List<ChannelInfo> list = new ArrayList<>(channels);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 39.6K bytes
    - Viewed (0)
Back to top