Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TopKSelector (0.2 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.1K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top