文件名称:Huffman
介绍说明--下载内容均来自于网络,请自行研究使用
运用赫夫曼编码的最优前缀码的贪心算法构造huffman树:
首先扫描输入文件,统计出现的字符以及每个字符出现的次数。每次取出现次数最小的那两个节点(node)合并成一个节点(node),并且将累计数值相加作为新的接点的累计数值,最顶层的是根节点(root) -Huffman coding using optimal prefix code of the greedy algorithm constructs huffman tree: First, scan the input file, the characters appear as well as statistics the number of occurrences of each character. Take the minimum number of occurrences for each two nodes (node) into a single node (node), and the total value added as the cumulative number of new contacts, the top is the root node (root)
首先扫描输入文件,统计出现的字符以及每个字符出现的次数。每次取出现次数最小的那两个节点(node)合并成一个节点(node),并且将累计数值相加作为新的接点的累计数值,最顶层的是根节点(root) -Huffman coding using optimal prefix code of the greedy algorithm constructs huffman tree: First, scan the input file, the characters appear as well as statistics the number of occurrences of each character. Take the minimum number of occurrences for each two nodes (node) into a single node (node), and the total value added as the cumulative number of new contacts, the top is the root node (root)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SA10225361李长刚_第六次实验\huffmantree\huffman.c
...........................\...........\huffman.h
...........................\...........\output.txt
...........................\...........\test.txt
...........................\SA10225361李长刚_第六次实验.doc
...........................\huffmantree
SA10225361李长刚_第六次实验
...........................\...........\huffman.h
...........................\...........\output.txt
...........................\...........\test.txt
...........................\SA10225361李长刚_第六次实验.doc
...........................\huffmantree
SA10225361李长刚_第六次实验