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
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 -
Method Summary
-
Constructor Details
-
HuffmanParams
- Parameters:
symbols
- symbols being encodedcodeWordLengths
- code word lengths for each symbol
-
-
Method Details