jubilant-funicular
|
A node in a Huffman tree. More...
#include <Compressor.h>
Public Member Functions | |
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 | |
Protected Attributes | |
int | m_freq |
the frequency of the nodes associated bytes | |
Private Attributes | |
HuffmanNode * | m_lChild |
the children of the node | |
HuffmanNode * | m_rChild |
A node in a Huffman tree.
Definition at line 13 of file Compressor.h.