commandline.flatFileToBinaryPackage.HuffMan.Huffman Class Reference

List of all members.

Public Member Functions

 Huffman (double[] PMF)
 Huffman ()
void reinitializePMF (double[] PMF)
String charCode (int index) throws IndexOutOfBoundsException
ArrayList< String > getArrayListOfCodeWords ()

Static Public Member Functions

static void main (String args[])

Public Attributes

double PMF []

Package Attributes

int _dad []
int _code []
int _len []
int _root

Static Package Attributes

static final int BITS_PER_CHAR = 8

Private Member Functions

void compress ()

Private Attributes

int PMF_SIZE
int MAX_SIZE


Detailed Description

Class: Huffman

Displays live Huffman compression/decompression of strings. The current string, either compressed or decompressed, is stored in _workString. When the user clicks on the applet, the data is compressed and the progress of the compression is displayed. Clicking again will decompress the data. The user may compress/decompress to their heart's content (or until their mouse button wears out.)

Assumptions for code simplicity:

Huffman compression code is based on the code in R. Sedgewick's _Algorithms in C++_.

slightly modified by Dominik Szopa

Definition at line 37 of file Huffman.java.


Constructor & Destructor Documentation

commandline.flatFileToBinaryPackage.HuffMan.Huffman.Huffman ( double[]  PMF  ) 

Precondition:
sum(_count) = 1;
Parameters:
PMF 

Definition at line 57 of file Huffman.java.

commandline.flatFileToBinaryPackage.HuffMan.Huffman.Huffman (  ) 


Member Function Documentation

void commandline.flatFileToBinaryPackage.HuffMan.Huffman.reinitializePMF ( double[]  PMF  ) 

String commandline.flatFileToBinaryPackage.HuffMan.Huffman.charCode ( int  index  )  throws IndexOutOfBoundsException

ArrayList<String> commandline.flatFileToBinaryPackage.HuffMan.Huffman.getArrayListOfCodeWords (  ) 

void commandline.flatFileToBinaryPackage.HuffMan.Huffman.compress (  )  [private]

Parameters:
_count= frequentie (aantal voorkomens)

Definition at line 136 of file Huffman.java.

Referenced by commandline.flatFileToBinaryPackage.HuffMan.Huffman.main(), and commandline.flatFileToBinaryPackage.HuffMan.Huffman.reinitializePMF().

static void commandline.flatFileToBinaryPackage.HuffMan.Huffman.main ( String  args[]  )  [static]

Definition at line 226 of file Huffman.java.


Member Data Documentation

Definition at line 50 of file Huffman.java.


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

Generated on Tue Jul 8 15:00:46 2008 for NODIC by  doxygen 1.5.5