Node - /* * Author: Dave Toth * Date: November 26, 2005 * *...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * Author: Dave Toth * Date: November 26, 2005 * * This class represents a node that we use for our priority queue. We can * insert into or remove instances of this class from the queue. The node * keeps track of its children which is not needed for the priority queue * because we use an array implementation of the priority queue. The * children are needed to reconstruct the binary tree later. They function * as pointers. */ public class Node { p ////////////////////////////////////////////////////////////////////// // Variables ////////////////////////////////////////////////////////////////////// /** * The symbol contained by the node. */ private String symbol; /** * The frequency with which the symbol occurs. */ private float frequency; /** * Reference to the node with the lower frequency that was combined with * another node to form this node. */ private Node leftChild; /** * Reference to the node with the higher frequency that was combined with * another node to form this node. */ private Node rightChild;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/10/2009 for the course CS 2223 taught by Professor Ruiz during the Fall '05 term at WPI.

Page1 / 2

Node - /* * Author: Dave Toth * Date: November 26, 2005 * *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online