public class ScaleTrieReader extends Object
ScaleTrieReaderfilters a contained trie reader by scaling all counts by a given multiple, removing all subtrees with zero root counts. Counts are rounded after multiplication using
Math.round(double). Thus pruning will only occur if the scaling factor is less than
|Constructor and Description|
Construct a scaling trie reader wrapping the specified reader and scaling counts with the specified value.
|Modifier and Type||Method and Description|
Returns the count of the next tree.
Returns the identifier of the symbol leading from the root of the current tree to the daughter subtree for the symbol, or
public ScaleTrieReader(TrieReader reader, double scale) throws IOException
public long readCount()
public long readSymbol() throws IOException
-1if there are no more subtrees for the current node.