lab_huffman
Hazardous Huffman Codes
 All Classes Namespaces Files Functions Variables Pages
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

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

Builds a new TreeNode with the given frequency as data.

Parameters
theFreqThe Frequency to build this TreeNode with.
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

Frequency HuffmanTree::TreeNode::freq

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

TreeNode* HuffmanTree::TreeNode::left

Left child of this TreeNode.

TreeNode* HuffmanTree::TreeNode::right

Right child of this TreeNode.


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