有向直線K中值問(wèn)題 給定一條有向直線L以及L 上的n+1 個(gè)點(diǎn)x0<x1<x2<… <xn。有向直線L 上的每個(gè)點(diǎn)xi都有一個(gè)權(quán) w(xi) 每條有向邊 (xi,xi-1),也都有一個(gè)非負(fù)邊長(zhǎng)d(xi,xi-1)。有向直線L 上的每個(gè)點(diǎn)xi 可以看作客戶,其服務(wù)需求量為w(xi) 。每條邊(xi,xi-1) 的邊長(zhǎng) , d(xi,xi-1) 可以看作運(yùn)輸費(fèi)用。如果在點(diǎn)xi 處未設(shè)置服務(wù)機(jī)構(gòu),則將點(diǎn)xi 處的服務(wù)需求沿有向邊轉(zhuǎn)移到點(diǎn)xj處服務(wù)機(jī)構(gòu)需付出的服務(wù)轉(zhuǎn)移費(fèi)用為w(xi)*d(xi,xj) 。在點(diǎn)0 x 處已設(shè)置了服務(wù)機(jī)構(gòu),現(xiàn)在要在直線L上增設(shè)k處服務(wù)機(jī)構(gòu),使得整體服務(wù)轉(zhuǎn)移費(fèi)用最小。
上傳時(shí)間: 2014-01-14
上傳用戶:manlian
Embest S3C44B0X Evaluation Board RTC Test Example RTC Check(Y/N)? y Set Default Time at 2004-12-31 FRI 23:59:59 Set Alarm Time at 2005-01-01 00:00:01 ... RTC Alarm Interrupt O.K. ... Current Time is 2005-01-01 SAT 00:00:01 RTC Working now. To set date(Y/N)? y Current date is (2005,01,01, SAT). input new date (yy-mm-dd w): 5-2-23 3 Current date is: 2005-02-23 WED RTC Working now. To set time(Y/N)? y Current time is (00:00:21). To set time(hh:mm:ss): 19:32:5 Current Time is 2005-02-23 WED 19:32:
標(biāo)簽: Evaluation RTC S3C44B0X Default
上傳時(shí)間: 2014-01-03
上傳用戶:baiom
鄰接矩陣類的根是A d j a c e n c y W D i g r a p h,因此從這個(gè)類開(kāi)始。程序1 2 - 1給出了類的描述。程 序中,先用程序1 - 1 3中函數(shù)Make2DArray 為二組數(shù)組a 分配空間,然后對(duì)數(shù)組a 初始化,以描述 一個(gè)n 頂點(diǎn)、沒(méi)有邊的圖的鄰接矩陣,其復(fù)雜性為( n2 )。該代碼沒(méi)有捕獲可能由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
E:\Visual_C__MFC擴(kuò)展編程實(shí)例 例18 動(dòng)態(tài)地抓取應(yīng)用程序的屏幕圖像并將其打印。 上一個(gè)實(shí)例打印的是文檔的報(bào)表,而不是當(dāng)前出現(xiàn)在屏幕上的內(nèi)容。在本例中,將實(shí)現(xiàn) 屏幕抓取并打印其內(nèi)容。M F C 為打印視提供了有限的支持, 但只要用M F C 在 C Vi e w : : O n D r a w ( )中所提供的設(shè)備環(huán)境,就可以繪制自己的視。在打印視的時(shí)候, M F C只需調(diào) 用具備打印機(jī)設(shè)備環(huán)境的O n D r a w ( )函數(shù)即可。但是,如果不繪制自己的視,例如,用一個(gè)或 者一個(gè)以上的控件窗口填充自己的視就不會(huì)打印任何東西。每個(gè)控件將使用自己的設(shè)備環(huán)境 將自己打印到屏幕,因此打印視的唯一途徑就是抓取屏幕(拷貝其內(nèi)容到一個(gè)位圖對(duì)象)并將其 打印到打印機(jī)。由于該功能整個(gè)與位圖相關(guān),因此將該功能封裝到了位圖類中。
標(biāo)簽: Visual_C MFC 打印 擴(kuò)展
上傳時(shí)間: 2015-10-18
上傳用戶:asddsd
用Delphi寫(xiě)的一個(gè)簡(jiǎn)單的加密解密算法,具體為:輸入一行字符串,從第n個(gè)字符開(kāi)始,沒(méi)間隔k個(gè)字符取出來(lái),然后把剩下的字符加到取出來(lái)的后面,形成密文,然后再解密
上傳時(shí)間: 2014-01-05
上傳用戶:wcl168881111111
給定一個(gè)k進(jìn)制數(shù)a,編程計(jì)算最少經(jīng)過(guò)多少次倒置相加運(yùn)算,a 變成回文數(shù)。
標(biāo)簽: 進(jìn)制數(shù)
上傳時(shí)間: 2015-10-22
上傳用戶:miaochun888
給定n個(gè)整數(shù)a , a , ,an 1 2 組成的序列。序列中元素i a 的符號(hào)定義為: ï î ï í ì - < = > = 1 0 0 0 1 0 sgn( ) i i i i a a a a 符號(hào)平衡問(wèn)題要求給定序列的最長(zhǎng)符號(hào)平衡段的長(zhǎng)度L,即: þ ý ü î í ì = + - = å = £ £ £ max 1| sgn( ) 0 1 j k i i j n k L j i a 。 例如,當(dāng)n=10,相應(yīng)序列為:1,1,-1,-2,0,1,3,-1,2,-1 時(shí),L=9。
上傳時(shí)間: 2015-10-28
上傳用戶:xaijhqx
給定一個(gè)n位正整數(shù)a,去掉其中任意k<=n個(gè)數(shù)字后,剩下的數(shù)字按原次序排列成一個(gè)新的正整數(shù)。對(duì)于給定的n位正整數(shù)a和正整數(shù)k,設(shè)計(jì)一個(gè)算法找出剩下數(shù)字組成的新數(shù)最小的刪數(shù)方案。
上傳時(shí)間: 2013-12-12
上傳用戶:685
陣列信號(hào)處理波束形成卡朋算法仿真:該程序陣列數(shù)為N,采樣點(diǎn)數(shù)為K,入射信號(hào)為30度角,干擾信號(hào)為60度角。 功能:提取有用信號(hào)抑制干擾信號(hào)
標(biāo)簽: 陣列信號(hào)處理 波束形成 仿真 算法
上傳時(shí)間: 2014-12-01
上傳用戶:jackgao
How the K-mean Cluster work Step 1. Begin with a decision the value of k = number of clusters Step 2. Put any initial partition that classifies the data into k clusters. You may assign the training samples randomly, or systematically as the following: Take the first k training sample as single-element clusters Assign each of the remaining (N-k) training sample to the cluster with the nearest centroid. After each assignment, recomputed the centroid of the gaining cluster. Step 3 . Take each sample in sequence and compute its distance from the centroid of each of the clusters. If a sample is not currently in the cluster with the closest centroid, switch this sample to that cluster and update the centroid of the cluster gaining the new sample and the cluster losing the sample. Step 4 . Repeat step 3 until convergence is achieved, that is until a pass through the training sample causes no new assignments.
標(biāo)簽: the decision clusters Cluster
上傳時(shí)間: 2013-12-21
上傳用戶:gxmm
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1