public class Partitioner
extends java.lang.Object
PartitionActiveListFactory
. This method is supposed
to provide O(n) performance so it's more preferable thanConstructor and Description |
---|
Partitioner() |
Modifier and Type | Method and Description |
---|---|
int |
partition(Token[] tokens,
int size,
int n)
Partitions the given array of tokens in place, so that the highest scoring n token will be at the beginning of
the array, not in any order.
|
public int partition(Token[] tokens, int size, int n)
tokens
- the array of tokens to partitionsize
- the number of tokens to partitionn
- the number of tokens in the final partition