文件名称:haffmancode(VC)
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 32kb
- 下载次数:
- 0次
- 提 供 者:
- r**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
----
Huffman 算法的不同实现
本目录下的程序用8种不同的方式实现了Huffman编码算法,这8种方式分别是
* huffman_a 使用链表结构生成Huffman树的算法,这是最基本的实现方法,效率最低。
* huffman_b 使用《数据结构》(严蔚敏,吴伟民,1997,C语言版)中给出的算法,将二叉树存放在连续空间里(静态链表),空间的每个结点内仍有左子树、右子树、双亲等指针。
* huffman_c 使用Canonical Huffman编码,同时对huffman_b的存储结构进行改造,将二叉树存放在连续空间tree里,空间的每个结点类型都和结点权值的数据类型相同,空间大小为2*num,tree[0]未用,tree[1..num]是每个元素的权值,生成Huffman后,tree[1..2*num-1]中是双亲结点索引。
* huffman_d 在huffman_c的基础上,增加预先排序的功能先用QuickSort算法对所有元素的权值从小到大排序,这样,排序后最前面的两个元素就是最小的一对元素了。我们可以直接将它们挑出来,组合成一个子树。然后再子树的权值用折半插入法插到已排序的元素表中, 保证所有结点有序。为了保证初始元素的顺序不变,我们另外使用了一个索引数组,所有排序中的交换操作都是在索引数组中进行的----- Huffman algorithm to achieve Catalog under different procedures used eight different ways to achieve a Huffman coding algorithm, eight models were used huffman_a* Chain Structure Generation Huffman tree algorithm, This is the most basic method, the minimum efficiency.* Huffman_b use of "data structure" (Yan Wei Min, Xiulan WU Weimin, 1997, C language version) is the algorithm stored in a binary tree will be continuous space (static List), the space within each node still left subtree, right subtrees, parents and other indicators.* Canonical huffman_c use Huffman coding, while huffman_b storage structure transformation, will be stored in a binary tree continuous space tree, space each node type and the right node value of the same data type, size space for two* num, tree
Huffman 算法的不同实现
本目录下的程序用8种不同的方式实现了Huffman编码算法,这8种方式分别是
* huffman_a 使用链表结构生成Huffman树的算法,这是最基本的实现方法,效率最低。
* huffman_b 使用《数据结构》(严蔚敏,吴伟民,1997,C语言版)中给出的算法,将二叉树存放在连续空间里(静态链表),空间的每个结点内仍有左子树、右子树、双亲等指针。
* huffman_c 使用Canonical Huffman编码,同时对huffman_b的存储结构进行改造,将二叉树存放在连续空间tree里,空间的每个结点类型都和结点权值的数据类型相同,空间大小为2*num,tree[0]未用,tree[1..num]是每个元素的权值,生成Huffman后,tree[1..2*num-1]中是双亲结点索引。
* huffman_d 在huffman_c的基础上,增加预先排序的功能先用QuickSort算法对所有元素的权值从小到大排序,这样,排序后最前面的两个元素就是最小的一对元素了。我们可以直接将它们挑出来,组合成一个子树。然后再子树的权值用折半插入法插到已排序的元素表中, 保证所有结点有序。为了保证初始元素的顺序不变,我们另外使用了一个索引数组,所有排序中的交换操作都是在索引数组中进行的----- Huffman algorithm to achieve Catalog under different procedures used eight different ways to achieve a Huffman coding algorithm, eight models were used huffman_a* Chain Structure Generation Huffman tree algorithm, This is the most basic method, the minimum efficiency.* Huffman_b use of "data structure" (Yan Wei Min, Xiulan WU Weimin, 1997, C language version) is the algorithm stored in a binary tree will be continuous space (static List), the space within each node still left subtree, right subtrees, parents and other indicators.* Canonical huffman_c use Huffman coding, while huffman_b storage structure transformation, will be stored in a binary tree continuous space tree, space each node type and the right node value of the same data type, size space for two* num, tree
(系统自动生成,下载前可以参看下载内容)
下载文件列表
3457435354
..........\Huffman.ncb
..........\Huffman.sln
..........\huffman.vcproj
..........\huffman_a.cpp
..........\huffman_a.h
..........\huffman_b.cpp
..........\huffman_b.h
..........\huffman_base.cpp
..........\huffman_base.h
..........\huffman_c.cpp
..........\huffman_c.h
..........\huffman_d.cpp
..........\huffman_d.h
..........\huffman_e.cpp
..........\huffman_e.h
..........\huffman_f.cpp
..........\huffman_f.h
..........\huffman_g.cpp
..........\huffman_g.h
..........\huffman_h.cpp
..........\huffman_h.h
..........\main.cpp
..........\Makefile
..........\README.TXT
..........\Huffman.ncb
..........\Huffman.sln
..........\huffman.vcproj
..........\huffman_a.cpp
..........\huffman_a.h
..........\huffman_b.cpp
..........\huffman_b.h
..........\huffman_base.cpp
..........\huffman_base.h
..........\huffman_c.cpp
..........\huffman_c.h
..........\huffman_d.cpp
..........\huffman_d.h
..........\huffman_e.cpp
..........\huffman_e.h
..........\huffman_f.cpp
..........\huffman_f.h
..........\huffman_g.cpp
..........\huffman_g.h
..........\huffman_h.cpp
..........\huffman_h.h
..........\main.cpp
..........\Makefile
..........\README.TXT