搜索资源列表
hufferman
- 用下表给出的字符集和频度的实际统计数据建立哈夫曼树,并实现以下报文的编码和译码:“THIS PROGRAM IS MY FAVORITE”字符 A B C D E F G H I J K L M 频度 64 13 22 32 103 21 15 47 57 1 5 32 20 字符 N O P Q R S T U V W X Y Z 频度 57 63 15 1 48 51 80 23 8 18 1 16 1-The actual statistics of the character set a
c
- 本次试验的主要要点是哈夫曼树的建立过程,这种算法的思路是: 1)依据给定的n个权值{W0,W1,……,Wn-1}构造n棵只有一个根结点的二叉树,这些二叉树组成一个森林F={T0,T1,……,Tn-1}。 2)在森林F中选取两棵根结点的权值最小的二叉树作为左、右子树合并成一棵新的二叉树,这棵新的二叉树的根结点的权值等于其左、右子树根结点的权值之和。这样一来,森林中就减少了一棵树。 3)重复上一步,直到森林F中只有一棵二叉树为止,这棵二叉树便是要得到的哈夫曼树 二叉树建立好之后,通过
haffuman
- 基于哈夫曼的压缩和解压缩,将文本中的字符作为节点构建哈夫曼树,通过01来编码,实现对文件的压缩,同时通过逆过程将文件解压缩。-Based Huffman compression and decompression, the text of the character as a node Huffman tree constructed by 01 to coding, to achieve the file compression, through the reverse process to
HUFFMAN
- 哈夫曼树,实现树的创建,编码,编码输出,译码,还有字符串和字符数组相互转换-Huffman tree, to achieve the creation of a tree coding, coding, decoding, and mutual conversion and a string array
myhuff
- 数据结构之霍夫曼树,采用霍夫曼树 (1)根据输入的字符和相应的权值建立哈夫曼树,并输出已建的相应内容作为检查; (2)用哈夫曼树实现前缀编码,并输出各字符的编码串; (3)输入一组二进制报文,进行译码,并输出译文。 -Huffman tree data structures, using Huffman tree (1) according to the input character and the corresponding weights build the Huffm
Huffman-Tree
- 使用三叉链表实现的哈夫曼树,统计inputfile1.txt中各字符的出现频率,并据此构造Huffman树,编制Huffman 码;根据已经得到的编码,对01形式的编码段进行译码。 具体的要求: 1.将给定字符文件编码,生成编码,输出每个字符出现的次数和编码; 2.将给定编码文件译码,生成字符,输出编码及其对应字符。 -Emergence of the frequency of each character in the trigeminal lists using the Hu
HUFFMAN
- 利用得到的权值构建huffman树、并输出每个字符对应的huffman编码,另外动态演示该哈夫曼树的生成过程。-Right to use the output value to construct the Huffman tree, and each character corresponding Huffman encoding, and dynamic display the generation process of the Huffman tree .
4.Huffman
- 哈夫曼树编码和解码,可以通过字符和字符串2种方式建树。-Huffman tree encoding and decoding, the character and string 2 ways of contribution.
HuffmanTree
- 哈夫曼树的建立。(可求哈弗曼编码) 1.在已有的字符和权中,用select函数选出其中权最小的两个字符; 2.在哈夫曼树的存储结构中,用这两个字符建立与其parent的关系; 3.从n+1到2*n-1依次算出各字符的parent,可得Huffman树;-Huffman tree establishment. (Rectifiable Huffman coding) 1. In the existing character and the right, with the right
exp6
- 对一段文本构造哈夫曼树,对所有字符根据其权值编码。对每个结点的左分支编码为0,右分支编码为1。(Constructs a Huffman tree for a text, encodes all characters according to their weights. The left branch of each node is encoded at 0 and the right branch is encoded at 1.)