文件名称:huffman 哈夫曼树的构造
-
所属分类:
- 标签属性:
- 上传时间:2012-09-01
-
文件大小:126.65kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
哈夫曼树的构造,假设有n个权值,则构造出的哈夫曼树有n个叶子结点。 n个权值分别设为 w1、w2、…、wn,则哈夫曼树的构造规则为: (1) 将w1、w2、…,wn看成是有n 棵树的森林(每棵树仅有一个结点); (2) 在森林中选出两个根结点的权值最小的树合并,作为一棵新树的左、右子树,且新树的根结点权值为其左、右子树根结点权值之和; (3)从森林中删除选取的两棵树,并将新树加入森林; (4)重复(2)、(3)步,直到森林中只剩一棵树为止,该树即为所求得的哈夫曼树。-Huffman tree construction, assuming there are n weights, Huffman tree is constructed with n leaf nodes. n-weights are set to w1, w2, ..., wn, the Huffman tree construction rules: (1) w1, w2, ..., wn as a forest of n trees (each tree only There is a node) (2) selected in the forest root weights two smallest trees combined, as a new tree to the left and right sub-tree, and the new root of the tree is the left-right and right sub-tree root and the right value (3) selected from the forest to remove two trees, and adding a new tree forest (4) repeat (2), (3) steps, until only the forest a tree until the tree is obtained by the Huffman tree.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
哈夫曼树/Debug/Huffman.exe
哈夫曼树/Debug/Huffman.obj
哈夫曼树/Debug/Huffman.pdb
哈夫曼树/Debug/vc60.pdb
哈夫曼树/Function.h
哈夫曼树/Huffman.cpp
哈夫曼树/Huffman.dsp
哈夫曼树/Huffman.dsw
哈夫曼树/Huffman.ncb
哈夫曼树/Huffman.opt
哈夫曼树/Huffman.plg
哈夫曼树/Debug
哈夫曼树
哈夫曼树/Debug/Huffman.obj
哈夫曼树/Debug/Huffman.pdb
哈夫曼树/Debug/vc60.pdb
哈夫曼树/Function.h
哈夫曼树/Huffman.cpp
哈夫曼树/Huffman.dsp
哈夫曼树/Huffman.dsw
哈夫曼树/Huffman.ncb
哈夫曼树/Huffman.opt
哈夫曼树/Huffman.plg
哈夫曼树/Debug
哈夫曼树
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.