edu.cmu.sphinx.decoder.search
Interface TokenStack

All Known Implementing Classes:
ArrayTokenStack

public interface TokenStack

A stack of tokens at a SentenceHMMState, allowing more than one path through the state.


Method Summary
 Token add(Token token)
          Adds the given Token to this TokenStack.
 void clear()
          Removes all of the Tokens from this TokenStack
 int getCapacity()
          Returns the capacity of this TokenStack, that is, the maximum number of elements allowed in this TokenStack.
 boolean isInsertable(float score, int frameNumber)
          Returns true if the given score is higher than the lowest scoring token in this TokenStack.
 

Method Detail

add

public Token add(Token token)
Adds the given Token to this TokenStack.

Returns:
the replaced Token, or null if no Token was replaced

isInsertable

public boolean isInsertable(float score,
                            int frameNumber)
Returns true if the given score is higher than the lowest scoring token in this TokenStack.

Parameters:
score - the score the check
Returns:
true if the given score is higher than the lowest scoring token, false otherwise

getCapacity

public int getCapacity()
Returns the capacity of this TokenStack, that is, the maximum number of elements allowed in this TokenStack.

Returns:
the capacity of this TokenStack

clear

public void clear()
Removes all of the Tokens from this TokenStack