public static class HuffmanBasic.Node
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
huffmanCode
The huffman code of this node.
|
int |
indexInArray
The corresponding index in the pmf array of this node.
|
HuffmanBasic.Node |
leftChild
The left child of the node.
|
double |
probability
The probability of the node.
|
HuffmanBasic.Node |
rightChild
The right child of the node.
|
| Constructor and Description |
|---|
Node(double prob,
int index)
Construct the node with the given probability value
and its index in the pmf array.
|
Node(HuffmanBasic.Node left,
HuffmanBasic.Node right)
Construct the parent node given the left child
and the right child.
|
public double probability
public int indexInArray
public HuffmanBasic.Node leftChild
public HuffmanBasic.Node rightChild
public java.lang.String huffmanCode
public Node(double prob,
int index)
prob - The given probability value.index - The corresponding index in the pmf array.public Node(HuffmanBasic.Node left, HuffmanBasic.Node right)
left - The left child.right - The right child.