@Shareable public class TopNTruncator extends Object implements VectorTruncator, Serializable
VectorTruncator that will retain the top n entries.| Constructor and Description |
|---|
TopNTruncator(int n) |
TopNTruncator(int n,
Threshold threshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
truncate(MutableSparseVector v)
Truncate a vector, removing any entries that do not satisfy some condition.
|
public TopNTruncator(int n,
Threshold threshold)
public TopNTruncator(int n)
public void truncate(MutableSparseVector v)
VectorTruncatortruncate in interface VectorTruncatorv - The vector to truncate.