Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TopKSelector (0.04 sec)

  1. android/guava/src/com/google/common/collect/TopKSelector.java

       */
      public static <T extends @Nullable Object> TopKSelector<T> least(
          int k, Comparator<? super T> comparator) {
        return new TopKSelector<>(comparator, k);
      }
    
      /**
       * Returns a {@code TopKSelector} that collects the greatest {@code k} elements added to it,
       * relative to the natural ordering of the elements, and returns them via {@link #topK} in
       * descending order.
       *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Ordering.java

          sort(list, this);
          if (list.size() > k) {
            list.subList(k, list.size()).clear();
          }
          list.trimToSize();
          return unmodifiableList(list);
        } else {
          TopKSelector<E> selector = TopKSelector.least(k, this);
          selector.offerAll(iterator);
          return selector.topK();
        }
      }
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 39.5K bytes
    - Viewed (0)
Back to top