Huffman

所属分类:数据结构
开发工具:C++
文件大小:92KB
下载次数:6
上传日期:2008-08-24 11:02:40
上 传 者good_gn
说明:  哈夫曼树算法 根据给定的n个权值{w1,w2,……wn},构造n棵只有根结点的二叉树,令起权值为wj 在森林中选取两棵根结点权值最小的树作左右子树,构造一棵新的二叉树,置新二叉树根结点权值为其左右子树根结点权值之和 在森林中删除这两棵树,同时将新得到的二叉树加入森林中 重复上述两步,直到只含一棵树为止,这棵树即哈夫曼树
(Huffman tree algorithm based on a given n-weights (w1, w2, ... ... wn), construct n trees only a root node of the tree, so that from the right value of wj in the forest root node to select two the right tree for the value of the smallest subtree around, a new binary tree structure, the right to buy a new tree root node value of its subtree root node around the right value in the forest and delete these two trees, At the same time, the new binary tree obtained by adding the forest to repeat the above two steps until a tree containing only the date, that is, Huffman tree tree)

文件列表:
Huffman\Huffman.dsp (3986, 2008-07-28)
Huffman\Huffman.dsw (539, 2008-07-20)
Huffman\Huffman.ncb (41984, 2008-08-24)
Huffman\Huffman.opt (53760, 2008-08-24)
Huffman\Huffman.plg (248, 2008-08-24)
Huffman\s.cpp (836, 2008-07-28)
Huffman\s.dsp (3341, 2008-07-20)
Huffman\s.ncb (25600, 2008-07-20)
Huffman\s.plg (0, 2008-07-20)
Huffman\Debug (0, 2008-07-23)
Huffman (0, 2008-08-24)

近期下载者

相关文件


收藏者