有向直線K中值問題 給定一條有向直線L以及L 上的n+1 個點x0<x1<x2<… <xn。有向直線L 上的每個點xi都有一個權 w(xi) 每條有向邊 (xi,xi-1),也都有一個非負邊長d(xi,xi-1)。有向直線L 上的每個點xi 可以看作客戶,其服務需求量為w(xi) 。每條邊(xi,xi-1) 的邊長 , d(xi,xi-1) 可以看作運輸費用。如果在點xi 處未設置服務機構,則將點xi 處的服務需求沿有向邊轉移到點xj處服務機構需付出的服務轉移費用為w(xi)*d(xi,xj) 。在點0 x 處已設置了服務機構,現在要在直線L上增設k處服務機構,使得整體服務轉移費用最小。
上傳時間: 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:
標簽: Evaluation RTC S3C44B0X Default
上傳時間: 2014-01-03
上傳用戶:baiom
鄰接矩陣類的根是A d j a c e n c y W D i g r a p h,因此從這個類開始。程序1 2 - 1給出了類的描述。程 序中,先用程序1 - 1 3中函數Make2DArray 為二組數組a 分配空間,然后對數組a 初始化,以描述 一個n 頂點、沒有邊的圖的鄰接矩陣,其復雜性為( n2 )。該代碼沒有捕獲可能由M a k e 2 D A r r a y 引發的異常。在析構函數中調用了程序1 - 1 4中的二維數組釋放函數D e l e t e 2 D
標簽: 矩陣
上傳時間: 2013-12-21
上傳用戶:lanjisu111
E:\Visual_C__MFC擴展編程實例 例18 動態地抓取應用程序的屏幕圖像并將其打印。 上一個實例打印的是文檔的報表,而不是當前出現在屏幕上的內容。在本例中,將實現 屏幕抓取并打印其內容。M F C 為打印視提供了有限的支持, 但只要用M F C 在 C Vi e w : : O n D r a w ( )中所提供的設備環境,就可以繪制自己的視。在打印視的時候, M F C只需調 用具備打印機設備環境的O n D r a w ( )函數即可。但是,如果不繪制自己的視,例如,用一個或 者一個以上的控件窗口填充自己的視就不會打印任何東西。每個控件將使用自己的設備環境 將自己打印到屏幕,因此打印視的唯一途徑就是抓取屏幕(拷貝其內容到一個位圖對象)并將其 打印到打印機。由于該功能整個與位圖相關,因此將該功能封裝到了位圖類中。
上傳時間: 2015-10-18
上傳用戶:asddsd
用Delphi寫的一個簡單的加密解密算法,具體為:輸入一行字符串,從第n個字符開始,沒間隔k個字符取出來,然后把剩下的字符加到取出來的后面,形成密文,然后再解密
上傳時間: 2014-01-05
上傳用戶:wcl168881111111
給定一個k進制數a,編程計算最少經過多少次倒置相加運算,a 變成回文數。
標簽: 進制數
上傳時間: 2015-10-22
上傳用戶:miaochun888
給定n個整數a , a , ,an 1 2 組成的序列。序列中元素i a 的符號定義為: ï î ï í ì - < = > = 1 0 0 0 1 0 sgn( ) i i i i a a a a 符號平衡問題要求給定序列的最長符號平衡段的長度L,即: þ ý ü î í ì = + - = å = £ £ £ max 1| sgn( ) 0 1 j k i i j n k L j i a 。 例如,當n=10,相應序列為:1,1,-1,-2,0,1,3,-1,2,-1 時,L=9。
上傳時間: 2015-10-28
上傳用戶:xaijhqx
給定一個n位正整數a,去掉其中任意k<=n個數字后,剩下的數字按原次序排列成一個新的正整數。對于給定的n位正整數a和正整數k,設計一個算法找出剩下數字組成的新數最小的刪數方案。
上傳時間: 2013-12-12
上傳用戶:685
陣列信號處理波束形成卡朋算法仿真:該程序陣列數為N,采樣點數為K,入射信號為30度角,干擾信號為60度角。 功能:提取有用信號抑制干擾信號
上傳時間: 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.
標簽: the decision clusters Cluster
上傳時間: 2013-12-21
上傳用戶:gxmm