Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::adaptive_huffman_detail::Model::Node Struct Reference

#include <Adaptive_Huffman.H>

Collaboration diagram for Aleph::adaptive_huffman_detail::Model::Node:
[legend]

Public Member Functions

bool is_leaf () const noexcept
 Test whether this node is a leaf.
 

Public Attributes

std::uint64_t weight = 0
 Subtree frequency.
 
int parent = -1
 Parent index, or -1 at the root.
 
int left = -1
 Left child index, or -1 at a leaf.
 
int right = -1
 Right child index, or -1 at a leaf.
 
int order = 0
 Position in the sibling-property numbering.
 
unsigned char symbol = 0
 Byte value, meaningful only at data leaves.
 

Detailed Description

Definition at line 74 of file Adaptive_Huffman.H.

Member Function Documentation

◆ is_leaf()

bool Aleph::adaptive_huffman_detail::Model::Node::is_leaf ( ) const
inlinenoexcept

Test whether this node is a leaf.

Returns
True if the node has no children.

Definition at line 86 of file Adaptive_Huffman.H.

References left.

Referenced by Aleph::Adaptive_Huffman_Decoder::decode_bit().

Member Data Documentation

◆ left

int Aleph::adaptive_huffman_detail::Model::Node::left = -1

◆ order

int Aleph::adaptive_huffman_detail::Model::Node::order = 0

◆ parent

int Aleph::adaptive_huffman_detail::Model::Node::parent = -1

◆ right

int Aleph::adaptive_huffman_detail::Model::Node::right = -1

◆ symbol

unsigned char Aleph::adaptive_huffman_detail::Model::Node::symbol = 0

Byte value, meaningful only at data leaves.

Definition at line 81 of file Adaptive_Huffman.H.

Referenced by Aleph::Adaptive_Huffman_Decoder::decode_bit(), and Aleph::adaptive_huffman_detail::Model::update().

◆ weight


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