Class HuffmanParams<T>
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.core.huffmanUtils.HuffmanParams<T>
-
- Type Parameters:
T
- type of the symbols in the alphabet being huffman-encoded
public final class HuffmanParams<T> extends Object
A class for carrying around encoding parameters for a canonical Huffman encoder. The HuffmanParams consist of an array of symbols and an array of corresponding codeWordLengths. The actual codewords themselves are not part of the params since they can be recalculated on demand. Therefore, the params are independent of the canonicalization state (the "canonical" huffman params are the same as the non-canonical params for a given set of symbol/frequencies; it is only the code words themselves are different after canonicalization; the code word lengths are the preserved).
-
-
Constructor Summary
Constructors Constructor Description HuffmanParams(List<T> symbols, List<Integer> codeWordLengths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<Integer>
getCodeWordLengths()
List<T>
getSymbols()
int
hashCode()
String
toString()
-