|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Generate an offline, interactive gallery of real FGK tree states. More...
#include <Adaptive_Huffman.H>#include <ah-errors.H>#include <tpl_array.H>#include "adaptive_huffman_demo_support.H"#include <algorithm>#include <cstddef>#include <exception>#include <fstream>#include <iostream>#include <locale>#include <ostream>#include <string>#include <string_view>Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
| Generate a self-contained, self-checking adaptive Huffman gallery. | |
Generate an offline, interactive gallery of real FGK tree states.
Build: cmake –build build –target adaptive_huffman_visual_example Run: ./build/Examples/adaptive_huffman_visual_example [output.html] [text]
Without custom text, three scenarios illustrate first appearances, repeated words, and a changing source distribution. The generated HTML includes SVG trees, a byte-by-byte timeline, current codes and actual bit costs. It needs no server, network resources, or extra dependencies. Every frame comes from a verified encoding/decoding step of the public API.
Definition in file adaptive_huffman_visual_example.cc.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Generate a self-contained, self-checking adaptive Huffman gallery.
| argc | Number of command-line arguments. |
| argv | Optional output path, then optional custom text of at most 32 bytes. |
Definition at line 369 of file adaptive_huffman_visual_example.cc.
References ah_invalid_argument_if, ah_runtime_error_unless, Aleph::and, Aleph::Array< T >::append(), Aleph::error(), output, and Aleph::Array< T >::size().