數(shù)據(jù)結(jié)構(gòu) 1、算法思路: 哈夫曼樹算法:a)根據(jù)給定的n個(gè)權(quán)值{W1,W2… ,Wn }構(gòu)成 n棵二叉樹的集合F={T1,T2…,T n },其中每棵二叉樹T中只有一個(gè)帶權(quán)為W i的根結(jié)點(diǎn),其左右子樹均空;b)在F中選取兩棵根結(jié)點(diǎn)的權(quán)值最小的樹作為左右子樹構(gòu)造一棵新的二叉樹,且置新的二叉樹的根結(jié)點(diǎn)的權(quán)值為其左、右子樹上結(jié)點(diǎn)的權(quán)值之和;c)F中刪除這兩棵樹,同時(shí)將新得到的二叉樹加入F中; d)重復(fù)b)和c),直到F只含一棵樹為止。
標(biāo)簽: 算法 W1 數(shù)據(jù)結(jié)構(gòu) 樹
上傳時(shí)間: 2016-03-05
上傳用戶:lacsx
7段數(shù)碼是純組合電路,通常的小規(guī)模專用IC,如74或4000系列的器件只能作十進(jìn)制BCD碼譯碼,然而數(shù)字系統(tǒng)中的數(shù)據(jù)處理和運(yùn)算都是2進(jìn)制的,所以輸出表達(dá)都是16進(jìn)制的,為了滿足16進(jìn)制數(shù)的譯碼顯示,最方便的方法就是利用VHDL譯碼程序在FPGA或CPLD中實(shí)現(xiàn)。本項(xiàng)實(shí)驗(yàn)很容易實(shí)現(xiàn)這一目的。例6-1作為7段BCD碼譯碼器的設(shè)計(jì),輸出信號(hào)LED7S的7位分別接如圖6-1數(shù)碼管的7個(gè)段,高位在左,低位在右。例如當(dāng)LED7S輸出為 "1101101" 時(shí),數(shù)碼管的7個(gè)段:g、f、e、d、c、b、a分別接1、1、0、1、1、0、1,接有高電平的段發(fā)亮,于是數(shù)碼管顯示“5”。
上傳時(shí)間: 2014-01-08
上傳用戶:wff
shc是一個(gè)加密shell腳本的工具.它的作用是把shell腳本轉(zhuǎn)換為一個(gè)可執(zhí)行的二進(jìn)制文件. 用shell腳本對(duì)系統(tǒng)進(jìn)行自動(dòng)化維護(hù),簡(jiǎn)單,便捷而且可移植性好. 但shell腳本是可讀寫的,很有可能會(huì)泄露敏感信息,如用戶名,密碼,路徑,IP等. 同樣,在shell腳本運(yùn)行時(shí)會(huì)也泄露敏感信息. shc是一個(gè)加密shell腳本的工具.它的作用是把shell腳本轉(zhuǎn)換為一個(gè)可執(zhí)行的二進(jìn)制文件. 這就很好的解決了上述問(wèn)題. tar zxvf shc-3.8.tgz cd shc-3.8 make test make make test make strings make install 這一步需要root權(quán)限 使用方法: shc -r -f script-name 注意:要有-r選項(xiàng), -f 后跟要加密的腳本名. 運(yùn)行后會(huì)生成兩個(gè)文件,script-name.x 和 script-name.x.c script-name.x是加密后的可執(zhí)行的二進(jìn)制文件. ./script-name 即可運(yùn)行. script-name.x.c是生成script-name.x的原文件(c語(yǔ)言)
上傳時(shí)間: 2013-12-21
上傳用戶:wfeel
進(jìn)行分段三次Hermite插值和分段三次Spline插值,比較F-C取導(dǎo)數(shù)方法所得到期收益率曲線逼近中債結(jié)算公司的到期收益率曲線的效果的程序
標(biāo)簽: Hermite Spline 分段 插值
上傳時(shí)間: 2014-01-07
上傳用戶:ikemada
電子秒表的設(shè)計(jì) 1、用系統(tǒng)8253定時(shí)器提供的55ms定時(shí)單位,設(shè)計(jì)秒表定時(shí)程序。 2、有關(guān)系統(tǒng)定時(shí)方法: PC機(jī)系統(tǒng)中的8253定時(shí)器0工作于方式3,外部提供一個(gè)時(shí)鐘作為CLK信號(hào), 頻率:f=1.1931816MHz。 定時(shí)器0輸出方波的頻率:fout=1.1931816/65536=18.2Hz。 輸出方波的周期Tout=1/18.2=54.945ms。8253A每隔55ms引起一次中斷,作為定時(shí)信號(hào)??捎? 5945ms作基本計(jì)時(shí)單位。 用BIOS調(diào)用INT 1AH可以取得該定時(shí)單位。例:1秒=18.2 (計(jì)時(shí)單位)
上傳時(shí)間: 2016-03-13
上傳用戶:asdkin
1、用系統(tǒng)8253定時(shí)器提供的55ms定時(shí)單位,設(shè)計(jì)秒表定時(shí)程序。 2、有關(guān)系統(tǒng)定時(shí)方法: PC機(jī)系統(tǒng)中的8253定時(shí)器0工作于方式3,外部提供一個(gè)時(shí)鐘作為CLK信號(hào), 頻率:f=1.1931816MHz。 定時(shí)器0輸出方波的頻率:fout=1.1931816/65536=18.2Hz。 輸出方波的周期Tout=1/18.2=54.945ms。8253A每隔55ms引起一次中斷,作為定時(shí)信號(hào)??捎? 5945ms作基本計(jì)時(shí)單位。 用BIOS調(diào)用INT 1AH可以取得該定時(shí)單位。例:1秒=18.2 (計(jì)時(shí)單位)
上傳時(shí)間: 2016-03-16
上傳用戶:aeiouetla
哈夫曼樹的建立 一、 實(shí)驗(yàn)?zāi)康模? 1. 理解哈夫曼樹及其應(yīng)用。 2. 掌握生成哈夫曼樹的算法。 二、 實(shí)驗(yàn)內(nèi)容: 哈夫曼樹,即最優(yōu)樹,是帶權(quán)路徑長(zhǎng)度最短的樹。有著廣泛的應(yīng)用。在解決某些判定問(wèn)題上,及字符編碼上,有著重要的價(jià)值。 構(gòu)造一棵哈夫曼樹,哈夫曼最早給出了算法,稱為哈夫曼算法: (1)根據(jù)給定的N個(gè)權(quán)值 W1,W2,W3,……,Wn ,構(gòu)成N棵二叉樹的集合F= T1,T2,T3,……,Tn ,其中每棵二叉樹T1只有一個(gè)帶權(quán)為WI的根結(jié)點(diǎn),其左右子樹均空。 (2)在 F中選出兩棵根結(jié)點(diǎn)權(quán)值最小的樹作為左右子樹構(gòu)造一棵新的二叉樹,且置新的二叉樹的權(quán)值為其左右子樹上的根結(jié)點(diǎn)的權(quán)值之和。 (3)在F中刪除這兩棵樹,同時(shí)將新得到的加到F之中。重復(fù)(2)和(3),直至F中只剩一個(gè)為止。
標(biāo)簽: 樹 實(shí)驗(yàn) 算法
上傳時(shí)間: 2013-12-24
上傳用戶:陽(yáng)光少年2016
Making a cheap 1M SPI Rom Emulator 8 second to copy from parallel to SPI re-Program STM Serial Flash M25P10 by reading 29010 parallel ROM Running on standard 8051 32 I/O, a TTL 7407 as bus switch. Total programming time is about 8 seconds including Erase, Program
標(biāo)簽: re-Program SPI Emulator parallel
上傳時(shí)間: 2016-03-22
上傳用戶:wanqunsheng
A* sudo sudo/* B* adduser script adduser C* rmuser script rmuser E* tout tout/* F* dumdum dumdum G* lostfile lostfile H* Mkfl.localsys Makefile.localsys I* spacegripe spacegripe J* sendmail.cf sendmail.cf N* remote remote.c O* distributed conrol distrib/* P* hosts and name server makerevhosts Q* xargs xargs/*
標(biāo)簽: adduser script rmuser sudo
上傳時(shí)間: 2016-03-29
上傳用戶:gxrui1991
Intro/: Directory containing introductory examples. HelloWorld.c A simple program that draws a box and writes "Hello World" in HelloWorld.f it. data The data file for the introductory progressive example. Lines.c Reads the data from file "data" and plots just the curve with Lines.f no labels, viewport or anything indicating quantity or units. Viewport.c Restricts the graph to a viewport and frames the viewport, Viewport.f leaving the remainder of the area for labels, etc. CharLbls.c Adds labels for the chart title, X-axis title, and Y-axis CharLbls.f title. Tics.c Adds tic marks to the viewport edges, but since clipping was Tics.f not set correctly, tics extend outside the viewport. Clip.c Sets clipping such that tic marks are clipped at the viewport Clip.f boundaries. TicLabels.c Adds numeric tic labels to the graph this is the final TicLabels.f installment of the progressive example.
標(biāo)簽: introductory HelloWorld containing Directory
上傳時(shí)間: 2016-03-29
上傳用戶:exxxds
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1