鄰接矩陣類的根是A d j a c e n c y W D i g r a p h,因此從這個類開始。程序1 2 - 1給出了類的描述。程 序中,先用程序1 - 1 3中函數(shù)Make2DArray 為二組數(shù)組a 分配空間,然后對數(shù)組a 初始化,以描述 一個n 頂點(diǎn)、沒有邊的圖的鄰接矩陣,其復(fù)雜性為( n2 )。該代碼沒有捕獲可能由M a k e 2 D A r r a y 引發(fā)的異常。在析構(gòu)函數(shù)中調(diào)用了程序1 - 1 4中的二維數(shù)組釋放函數(shù)D e l e t e 2 D
標(biāo)簽: 矩陣
上傳時(shí)間: 2013-12-21
上傳用戶:lanjisu111
在sco unix 下顯示前n天或后n天日期的處理程序。 printf("功能: 時(shí)間戳與時(shí)間格式字符串的轉(zhuǎn)換程序\n") printf(" -i 輸入的參數(shù)為時(shí)間戳\n") printf(" -s 輸入的參數(shù)為格式化時(shí)間\n") printf(" -t 輸入的時(shí)間取當(dāng)前系統(tǒng)時(shí)間\n") printf(" -x 輸入的時(shí)間增加或減少的天數(shù)\n") printf(" -o 輸出的時(shí)間為時(shí)間戳格式\n") printf(" -O 輸出的時(shí)間為格式化時(shí)間\n") printf(" -h 幫助文件-查看[format]如何定義,例 %s -h\n",procname) printf("范例:1 取當(dāng)前日期的前2天的時(shí)間顯示 %s -t -x -2\n",procname) printf(" 2 取20030101的前5天的時(shí)間顯示 %s -s 20030101000000 -x -5\n",procname) printf(" 3 取20031231的后5天的時(shí)間顯示 %s -s 20031231000000 -x 5 -O \"%%D %%T\"\n",procname) printf(" 4 取時(shí)間戳為1089619417的時(shí)間顯示 %s -i 1089619417 \n",procname) printf(" 5 取時(shí)間戳為1089619417的后4天的時(shí)間顯示 %s -i 1089619417 -x 4 \n",procname)
標(biāo)簽: printf unix sco 處理程序
上傳時(shí)間: 2015-10-17
上傳用戶:TRIFCT
HDOJ ACM input:The input consists of T test cases. The number of test cases ) (T is given in the first line of the input. Each test case begins with a line containing an integer N , 1<=N<=200 , that represents the number of tables to move. Each of the following N lines contains two positive integers s and t, representing that a table is to move from room number s to room number t (each room number appears at most once in the N lines). From the N+3-rd line, the remaining test cases are listed in the same manner as above.
標(biāo)簽: input cases test The
上傳時(shí)間: 2015-10-18
上傳用戶:三人用菜
處理程序,在使用單片機(jī)作為控制cpu時(shí),請稍作簡化,具體的PID參數(shù)必須由具體對象通過實(shí)驗(yàn)確定。由于單片機(jī)的處理速度和ram資源的限制,一般不采用浮點(diǎn)數(shù)運(yùn)算,而將所有參數(shù)全部用整數(shù),運(yùn)算 到最后再除以一個2的N次方數(shù)據(jù)(相當(dāng)于移位),作類似定點(diǎn)數(shù)運(yùn)算,可大大提高運(yùn)算速度,根據(jù)控制精度的不同要求,當(dāng)精度要求很高時(shí),注意保留移位引起的“余數(shù)”,做好余數(shù)補(bǔ)償。這個程序只是一般常用pid算法的基本架構(gòu),沒有包含輸入輸出處理部分。
上傳時(shí)間: 2013-12-19
上傳用戶:koulian
Input The first line of the input contains a single integer T (1 <= T <= 20), the number of test cases. Then T cases follow. The first line of each case contains N, and the second line contains N integers giving the time for each people to cross the river. Each case is preceded by a blank line. There won t be more than 1000 people and nobody takes more than 100 seconds to cross. Output For each test case, print a line containing the total number of seconds required for all the N people to cross the river. Sample Input 1 4 1 2 5 10 Sample Output 17
標(biāo)簽: the contains integer number
上傳時(shí)間: 2015-10-27
上傳用戶:plsee
第一步:采用PID控制,在控制器啟動過程中,首先采用灰色估計(jì)器對不確定部分的模型參數(shù)建立GM(0,N) 模型進(jìn)行估計(jì),其中 控制算法為 第二步:按估計(jì)參數(shù)加上補(bǔ)償控制,估計(jì)器停止工作,灰色控制算法為
上傳時(shí)間: 2015-11-02
上傳用戶:天涯
AVR單片機(jī)入門及C語言高效設(shè)計(jì)實(shí)踐(六) ATMEAG16L的定時(shí)/計(jì)數(shù)器 ATMEAG16L有兩個8位定時(shí)/計(jì)數(shù)器(T/C0、T,C2)和一個16位定時(shí)/計(jì)數(shù)器T/C1)。每一個計(jì)數(shù)器都支持PWM(脈沖寬度調(diào)制)輸出功能。PWM輸出在電機(jī)控制、開關(guān)電源、信號發(fā)生等領(lǐng)域有著廣泛的應(yīng)用。[第一段]
上傳時(shí)間: 2015-11-16
上傳用戶:集美慧
快速瞭解ECLIPSE 目錄 序言· 一.Eclipse 簡介 二.Eclipse 組織 三.Eclipse 相關(guān)術(shù)語 四.Eclipse 平臺 五.EMF & GEF 介紹 六.關(guān)於Eclipse、SWT 和JFace 一個SWT 應(yīng)用程式的基礎(chǔ)材料 基本控制項(xiàng) 標(biāo)籤 文件 按鈕 事件監(jiān)聽器 複合控制項(xiàng) Shell 佈局管理器 FillLayout GridLayout GridData 15 建立一個執(zhí)行程式 為什麼使用SWT 七.OSGI 簡介 Eclipse 資源 附錄1 SWT 的內(nèi)幕? 附錄2 相關(guān)網(wǎng)站 附錄3 外掛開發(fā)
標(biāo)簽: Eclipse ECLIPSE EMF GEF
上傳時(shí)間: 2015-11-30
上傳用戶:cc1
我的查表算法思路是這樣的 : 1、構(gòu)造N個二維數(shù)組(N=你需要輸入的最大頻率值位數(shù),例如你需要精確到10HZ,最高30MHZ,那么就有10M位、1M位、100K位、10K位、1K位、100HZ位、10HZ位,共7位,所以N=7)。 2、根據(jù)你所用的芯片型號,和晶振頻率,計(jì)算出每個頻率位0-9時(shí)的控制字。 3、使用時(shí),把你頻率的每一位控制字,查表讀出,并相加(特別需要注意進(jìn)位也需要處理)。 4、把加出的4字節(jié)控制字,送DDS。
上傳時(shí)間: 2015-12-21
上傳用戶:zjf3110
用遞推法產(chǎn)生正交多項(xiàng)式系,即求alpha[j+1]、beta[j] 入口參數(shù):m是數(shù)據(jù)點(diǎn)數(shù),n是擬合的最高階數(shù), float x[],float y[]是對應(yīng)縱橫坐標(biāo),出口參數(shù):a[] 是最小二乘擬合參數(shù),alpha[]、beta[]是遞推系數(shù)
標(biāo)簽: 正 多項(xiàng)式
上傳時(shí)間: 2014-01-19
上傳用戶:gyq
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1