edu.cmu.sphinx.decoder.search
Class Partitioner

java.lang.Object
  extended byedu.cmu.sphinx.decoder.search.Partitioner

public class Partitioner
extends java.lang.Object

Partitions a list of tokens according to the token score.


Constructor Summary
Partitioner()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Partitioner

public Partitioner()
Method Detail

partition

public 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.

Parameters:
tokens - the array of tokens to partition
size - the number of tokens to partition
n - the number of tokens in the final partition
Returns:
the index of the last element in the partition