HuffmanNode<T>
Helpers & Utilities · AiDotNet.ModelCompression
Represents a node in the Huffman tree.
Constructors
| Constructor | Summary |
|---|---|
HuffmanNode(T value, int frequency, bool isLeaf, int id, HuffmanNode<T> left, HuffmanNode<T> right) |
Initializes a new instance of the HuffmanNode class. |
Properties
| Property | Summary |
|---|---|
HuffmanNode<T> Left { get; set; } |
Gets the left child node (null for leaf nodes). |
HuffmanNode<T> Right { get; set; } |
Gets the right child node (null for leaf nodes). |
T Value { get; set; } |
Gets the value stored in this node (for leaf nodes, default for internal nodes). |
bool IsLeaf { get; set; } |
Gets a value indicating whether this is a leaf node. |
int Frequency { get; set; } |
Gets the frequency of this value or subtree. |
int Id { get; set; } |
Gets the unique identifier for stable sorting. |