jubilant-funicular
|
represents a leaf in a Huffman tree More...
#include <Compressor.h>
Public Member Functions | |
HuffmanLeaf () | |
basic constructor | |
HuffmanLeaf (GLubyte data, int freq) | |
constructs a leaf with given data and freq | |
~HuffmanLeaf () | |
destroys leaf | |
GLubyte | getData () const |
returns m_data | |
![]() | |
HuffmanNode () | |
basic constructor | |
HuffmanNode (HuffmanNode *l, HuffmanNode *r) | |
sets l and r as children of this and sets m_freq to the sum of their frequencies | |
virtual | ~HuffmanNode () |
recursively destroys node | |
auto | getEncodings (crstring enc="") const -> std::map< GLubyte, std::string > |
returns map of all the bytes and how they are encoded | |
HuffmanNode * | getLeft () const |
returns children | |
HuffmanNode * | getRight () const |
bool | hasChildren () const |
returns whether or not the node has children | |
int | getFrequency () const |
returns the frequency of the node | |
Private Attributes | |
GLubyte | m_data |
the byte associated with the leaf | |
Additional Inherited Members | |
![]() | |
int | m_freq |
the frequency of the nodes associated bytes | |
represents a leaf in a Huffman tree
Definition at line 38 of file Compressor.h.