C++实现的哈弗曼编码,并有流程图(1)I:初始化(Initialization)。从指定的英文文件中Sourcefile.txt读取数据,根据文件内容统计的字符的频度,建立哈夫曼树。 (2)E:编码(Encoding)。利用已经建好的哈夫曼树进行编码,并将每个字符的编码写入文件HuffCode.txt中保存。 (3)C:压缩(Compress)。根据HuffCode.txt中编码对文件Sourcefile.txt进行重新编码,并将重新编码后的内容写入文件CodeFile.txt中。 (4)D:译码(Decoding)。利用已经建好的哈夫曼树将文件CodeFile.txt中的代码进行译码,结果存入文件TextFile中。 (5)P:打印代码文件(Print)。将文件CodeFile.txt的内容显示在终端上,每行50个代码。 (6)T:显示哈夫曼树(Treeprinting)。将已经在内存中的哈夫曼树以直观的方式(树或凹入表形式)显示在终端上。
标签: 编码
上传时间: 2013-12-24
上传用户:gxrui1991
% DYNMODES calculates ocean dynamic vertical modes % taking a column vector of Brunt-Vaisala values (Nsq) at % different pressures (p) and calculating some number of % dynamic modes (nmodes). % Note: The input pressures need not be uniformly spaced, % and the deepest pressure is assumed to be the bottom.
标签: Brunt-Vaisala calculates DYNMODES vertical
上传时间: 2013-12-06
上传用户:busterman
Abstract-The effect of the companding process on QAM signals has been under investigation for the past several years. The compander, included in the PCM telephone network to improve voice performance, has an unusual affect on digital QAM data signals which are transmitted over the same channel. The quantization noise, generated by the companding process which is multiplicative (and asymmetric), degrades the detectability performance of the outermost points of the QAM constellation more than that of the inner points. The combined effect of the companding noise and the inherent white gaussian noise of the system, leads us to a re-examination of signal constellation design. In this paper we investigate the detectability performance of a number of candidates for signal constellations including, a typical rectangular QAM constellation, the same constellation with the addition of a smear-desmear operation, and two new improved QAM constellation designs with two-dimensional warpi
标签: investigation Abstract-The companding the
上传时间: 2013-12-20
上传用户:英雄
输入一段英文字符,试为该文中的每个字符编制相应的哈夫曼码。 (1)I:初始化(Initialization)。对输入的一段英文中的每个字符统计其权值,建立哈夫曼树; (2)E:编码(Encoding)。利用已建好的哈夫曼树,对每个字符进行编码。 (3)D:译码(Decoding)。利用已建好的每个编码,对输入的一个由0、1组成的序列进行译码; (4)P:印代码文件(Print)。将每个字符编的哈夫曼码和译码结果显示在终端上。
上传时间: 2013-12-16
上传用户:lizhen9880
熟悉用单片机产生声音的方法 硬件要求:拨码开关S10的第3位置ON,其他位置OFF LIST P=16F877A,R=DEC 定义器件,默认为十进制
上传时间: 2013-12-26
上传用户:wpwpwlxwlx
/*快速排序采用分治算法,将所需要排序的内容从文件读入放入数组a[p:r],按以下三个步骤进行排序 以a[p]为基准元素将数组分为三段,将大于基准元素的放到后面的单元,小的放到前面的单元, 再用递归对a[p:q-1],a[q+1:r]进行排序,最后合并 时间复杂度:最坏时间复杂度:O(n2) 平均时间复杂度:O(nlogn) */
上传时间: 2016-06-29
上传用户:chenbhdt
PESQ,即ITU-T的标准文档P.862,一般来说,很难直接从网络上下到,我这里是通过公司帐号下载来的。
标签: PESQ
上传时间: 2014-07-25
上传用户:BIBI
对PL0原编译器进行了以下的扩充:1.增加以下保留字else(elsesym), for(forsym),to(tosym),downto(downtosym),return(returnsym),[(lmparen),](rmparen) 2.增加了以下的运算符:+=(eplus),-=(eminus),++(dplus),--(dminus) 取址运算符&(radsym),指向运算符@(padsym) 3.修改单词:修改不等号#为<> 4.扩充语句:(1)增加了else子句 (2)增加了for语句 5.增加运算:(1).++运算 (2).--运算;(3).+=运算 (4).-=运算;(5).&取址运算; (6).@指向运算; 6.增加类型:(1).增加多维数组a[i1][i2][i3]……[i(n-1)][i(n-2)][in] (2).增加指针类型(任何变量都能存放指针,但不支持指针的指针,如b:=@@a应该改写为c:=@a,b:=@c) 7.将过程procedure扩展为函数:(1).允许定义过程时在其后加参数(var a, var b,……..,var n) (2)允许通过指针向函数形式参数传地址;(3)允许返回值;可以用 a:=p(a,b,c….,n) 返回
标签: downtosym returnsym elsesym downto
上传时间: 2016-07-02
上传用户:saharawalker
对液位先建模,然后对其进行P、PI、PD、PID算法,观察模型变化
上传时间: 2014-01-13
上传用户:pompey
1.一个表达式和一个二叉树之间,存在着自然的对应关系。写一个程序,实现基于二叉树表示的算术表达式Expression的操作。 2.假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^(乘幂))。实现以下操作: ⑴ReadExpr(E)——以字符序列的形式输入语法正确的前缀表达式并构造表达式E。 ⑵WriteExpr(E)——用带括弧的中缀表达式输出表达式E。 ⑶Assign(V,c)——实现对变量Vde赋值(V=c),变量的初值为0。 ⑷Value(E)——对算术表达式E求值。 ⑸CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P(E2)。 3.在读入表达的字符序列的同时,完成运算符和运算数的识别和处理以及相应的运算。 4.在识别出运算数的同时,要将其字符形式转换成整数形式。 5.用在后根遍历的次序对表达式求值。
上传时间: 2014-11-27
上传用户:偷心的海盗