文件名称:huffman
介绍说明--下载内容均来自于网络,请自行研究使用
一份huff_tc.c,只能在tc下运行,因为加入了用tc图形界面直观画出树形的代码。一份是huff_vc.c,是在vc和tc下都能运行的程序,没有直观表达编码的树形结构。
[目的]
构建所输入符号(及权值)的哈夫曼树,并利用该树求出各符号的编码,深入理解最优二叉树的概念及其特性。
[问题描述]
读入各个符号及其权值,求各符号的哈夫曼编码。
[基本要求]
(1)读入各个符号及其权值,建立哈夫曼树;
(2)利用建立的哈夫曼树对各符号进行编码,输出编码结果。
[选做内容]
将所建立的哈夫曼树以直观的方式(树或凹入形式的表)显示。
-huff_tc.c, can only run at tc, because using the add tc intuitive graphical interface to draw tree code [Objective] To construct the input symbols (and the right value) of the Huffman tree, and use the tree to derive the coded symbols, in-depth understanding of the concept of optimal binary tree and its characteristics. [Problem Descr iption] read into the various symbols and their weights, and Huffman coding of the symbols. [Basic requirements] (1) read into the various symbols and their weights, Huffman tree set up (2) the use of the Huffman tree for the set up of the symbol encoding, output encoding results. [Does the content of the election] will be set up by the Huffman tree to intuitive way (tree or indentations in the form of the table) shows.
[目的]
构建所输入符号(及权值)的哈夫曼树,并利用该树求出各符号的编码,深入理解最优二叉树的概念及其特性。
[问题描述]
读入各个符号及其权值,求各符号的哈夫曼编码。
[基本要求]
(1)读入各个符号及其权值,建立哈夫曼树;
(2)利用建立的哈夫曼树对各符号进行编码,输出编码结果。
[选做内容]
将所建立的哈夫曼树以直观的方式(树或凹入形式的表)显示。
-huff_tc.c, can only run at tc, because using the add tc intuitive graphical interface to draw tree code [Objective] To construct the input symbols (and the right value) of the Huffman tree, and use the tree to derive the coded symbols, in-depth understanding of the concept of optimal binary tree and its characteristics. [Problem Descr iption] read into the various symbols and their weights, and Huffman coding of the symbols. [Basic requirements] (1) read into the various symbols and their weights, Huffman tree set up (2) the use of the Huffman tree for the set up of the symbol encoding, output encoding results. [Does the content of the election] will be set up by the Huffman tree to intuitive way (tree or indentations in the form of the table) shows.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huff_tc.c
huff_vc.c
huff_vc.c