- java.lang.Object
-
- de.bernd_michaely.x3f.types.HuffmanTree
-
public class HuffmanTree extends Object
This class describes a Huffman tree created from a code word table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
HuffmanTree.InnerNode
Class representing an inner node in a binary tree.protected static class
HuffmanTree.LeafNode
Class representing a leaf node in a binary tree.protected static interface
HuffmanTree.Node
Interface representing any type of node in a binary tree.static class
HuffmanTree.PrefixException
Exception thrown if the given code word table is not prefix free.
-
Field Summary
Fields Modifier and Type Field Description protected HuffmanTree.InnerNode
root
-
Constructor Summary
Constructors Constructor Description HuffmanTree(int[] arHuffmanCodeWordTable)
Creates a Huffman tree from code word table.
-
-
-
Field Detail
-
root
protected final HuffmanTree.InnerNode root
-
-
Constructor Detail
-
HuffmanTree
public HuffmanTree(int[] arHuffmanCodeWordTable) throws HuffmanTree.PrefixException
Creates a Huffman tree from code word table.- Parameters:
arHuffmanCodeWordTable
- a code word table as given in FOVb data containing image data of data format 11 (see original documentation)- Throws:
HuffmanTree.PrefixException
- if the given code word table is not prefix free
-
-