Welcome![Sign In][Sign Up]
Location:
Search - haffman in data structure

Search list

[Data structshaffmancode(VC)

Description: ---- 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
Platform: | Size: 32768 | Author: ray | Hits:

[Data structshaffman

Description: 用二叉树实现哈佛曼编码,里面有详细的介绍-Harvard Man with binary tree coding realize, there are detailed introduction
Platform: | Size: 1024 | Author: snow | Hits:

[Data structshaffman

Description: 哈夫曼编码与树结构的东西啊,做数据结构试验用-Huffman encoding and tree structure of things, ah, make the data structure used in the experiments
Platform: | Size: 1024 | Author: 人民 | Hits:

CodeBus www.codebus.net