public class Classifier<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Classifier.CountedValue<T>
Aggregates a value and the number of times it has been submitted.
|
Constructor and Description |
---|
Classifier()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getItemCount()
Returns the number of values submitted so far.
|
Collection<Classifier.CountedValue<T>> |
getThresholdValues(int minCount)
Returns a sorted list of the values with a certain minimum count.
|
SortedSet<Classifier.CountedValue<T>> |
getTopValues(int nValue)
Returns a sorted list of the N most popular values.
|
long |
getValueCount()
Returns the number of distinct values seen so far.
|
void |
submit(T value)
Submits a value for categorisation.
|
public void submit(T value)
value
- valuepublic long getItemCount()
public long getValueCount()
public SortedSet<Classifier.CountedValue<T>> getTopValues(int nValue)
nValue
- maximum number of values to returnpublic Collection<Classifier.CountedValue<T>> getThresholdValues(int minCount)
minCount
- minimum number of submissions for each returned valueCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.