lab_huffman
Hazardous Huffman Codes
HuffmanTree::TreeNode Class Reference

TreeNode class: internal representation of the Huffman tree. More...

Collaboration diagram for HuffmanTree::TreeNode:
[legend]

Public Member Functions

 TreeNode (Frequency theFreq)
 Builds a new TreeNode with the given frequency as data. More...
 
 TreeNode (int frequency)
 Builds a new TreeNode with the given integer as its frequency counter, used for building internal nodes. More...
 

Public Attributes

Frequency freq
 Data for this TreeNode: contains a character and a frquency count. More...
 
TreeNodeleft
 Left child of this TreeNode. More...
 
TreeNoderight
 Right child of this TreeNode. More...
 

Detailed Description

TreeNode class: internal representation of the Huffman tree.

Done using linked memory.

Constructor & Destructor Documentation

◆ TreeNode() [1/2]

HuffmanTree::TreeNode::TreeNode ( Frequency  theFreq)
inline

Builds a new TreeNode with the given frequency as data.

Parameters
theFreqThe Frequency to build this TreeNode with.

◆ TreeNode() [2/2]

HuffmanTree::TreeNode::TreeNode ( int  frequency)
inline

Builds a new TreeNode with the given integer as its frequency counter, used for building internal nodes.

Parameters
frequencyThe frequency for this internal node.

Member Data Documentation

◆ freq

Frequency HuffmanTree::TreeNode::freq

Data for this TreeNode: contains a character and a frquency count.

◆ left

TreeNode* HuffmanTree::TreeNode::left

Left child of this TreeNode.

◆ right

TreeNode* HuffmanTree::TreeNode::right

Right child of this TreeNode.


The documentation for this class was generated from the following file: