org.apache.mahout.cf.taste.common
Class MinK<T>
java.lang.Object
org.apache.mahout.cf.taste.common.MinK<T>
public class MinK<T>
- extends Object
this class will preserve the k minimum elements of all elements it has been offered
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MinK
public MinK(int k,
Comparator<? super T> comparator)
queueingComparator
protected Comparator<? super T> queueingComparator(Comparator<? super T> stdComparator)
sortingComparator
protected Comparator<? super T> sortingComparator(Comparator<? super T> stdComparator)
greatestSmall
public T greatestSmall()
offer
public void offer(T item)
isEmpty
public boolean isEmpty()
size
public int size()
retrieve
public List<T> retrieve()
peek
protected T peek()
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.