K均值算法: 給定類的個數K,將N個對象分到K個類中去, 使得類內對象之間的相似性最大,而類之間的相似性最小
標簽: K均值算法
上傳時間: 2014-01-05
上傳用戶:wangyi39
//初始化 initscr() //獲得屏幕尺寸 getmaxyx(stdscr, h, w) //畫背景 for(i=0 i<h i++) for(j=0 j<w j++){ mvaddch(i, j, ACS_CKBOARD) } refresh() //建立窗口 pad = newpad(80, 128) for(i=0 i<80 i++){ char line[128] sprintf(line, "This line in pad is numbered d\n", i) mvwprintw(pad, i, 0, line) } //刷新屏幕 refresh() prefresh(pad, 0, 1, 5, 10, 20, 45) for(i=0 i<50 i++){ prefresh(pad, i+1, 1, 5, 10, 20, 45) usleep(30000) } //等待按鍵 getch()
標簽: getmaxyx initscr stdscr for
上傳時間: 2014-08-30
上傳用戶:龍飛艇
用堆棧實現迷宮求解問題 基本思想: 若當前位置可以通過,則壓入棧中,否則探求下一位置,若走不通,則回朔,迷宮大小:M*N.迷宮設置自定義。 求解迷宮問題的簡單方法是:從入口出發,沿某一方向進行探索,若能走通,則繼續向前走;否則沿原路返回,換一方向再進行探索,直到所有可能的通路都探索到為止。 為避免走回到已經進入的點(包括已在當前路徑上的點和曾經在當前路徑上的點),凡是進入過的點都應做上記號。
上傳時間: 2017-06-17
上傳用戶:colinal
藍芽電話簿範本,使用CSR晶片開發,包括伺服及客戶端應用。
標簽:
上傳時間: 2013-12-23
上傳用戶:liuchee
生成Trick文件工具 1.Open command line 2.input tricktest Usage: TrickTest -f -o -i -f source mpeg2 file to trick -o trick output directory -i output file id -m max coding error, default 0 -b max bitrate for trick generate, default 0 mean no limit -s trick buffer block size, must be n*188 -l log file, default c:\tricktest.log example: tricktest -f 黑鷹行動.mpg -o c:\temp -i A -m 1000 -b 3750000 soure file: 黑鷹行動.mpg output directory: c:\temp filename: 000000A,000000A.ff,000000A.fr,000000A.vvx max coding error: 1000 trick generation speed: 3750000 bps a
標簽: TrickTest tricktest command source
上傳時間: 2014-01-23
上傳用戶:水口鴻勝電器
設有由n個不相同的整數組成的數列,記為: a(1)、a(2)、……、a(n)且a(i)<>a(j) (i<>j) 例如3,18,7,14,10,12,23,41,16,24。 若存在i1<i2<i3< … < ie 且有a(i1)<a(i2)< … <a(ie)則稱為長度為e的不下降序列。如上例中3,18,23,24就是一個長度為4的不下降序列,同時也有3,7,10,12,16,24長度為6的不下降序列。程序要求,當原數列給出之后,求出最長的不下降序列。
上傳時間: 2013-12-14
上傳用戶:tonyshao
M i c r o s o f t公司編譯了一個所有可能的錯誤代碼的列表,并且為每個錯誤代碼分配了一個3 2 位的號碼。Wi n E r r o r. h 頭文件包含了M i c r o s o f t 公司定義的錯誤代碼的列 表。
上傳時間: 2013-12-08
上傳用戶:凌云御清風
SensorSimII is the framework of a simulator that I have been working on to study how future sensor networks should operate. the simulator is written in a modular fashion so that it can be adapted to serve a number of needs. However, please remember that it is still a work in progress. This web page is here just to give a glimpse of the approach we ve taken with this simulator. Likewise this web page is simply preliminary information to attempt to answer some of the questions that researchers might have about this project.
標簽: SensorSimII framework simulator working
上傳時間: 2013-12-26
上傳用戶:wsf950131
【問題描述】 在一個N*N的點陣中,如N=4,你現在站在(1,1),出口在(4,4)。你可以通過上、下、左、右四種移動方法,在迷宮內行走,但是同一個位置不可以訪問兩次,亦不可以越界。表格最上面的一行加黑數字A[1..4]分別表示迷宮第I列中需要訪問并僅可以訪問的格子數。右邊一行加下劃線數字B[1..4]則表示迷宮第I行需要訪問并僅可以訪問的格子數。如圖中帶括號紅色數字就是一條符合條件的路線。 給定N,A[1..N] B[1..N]。輸出一條符合條件的路線,若無解,輸出NO ANSWER。(使用U,D,L,R分別表示上、下、左、右。) 2 2 1 2 (4,4) 1 (2,3) (3,3) (4,3) 3 (1,2) (2,2) 2 (1,1) 1 【輸入格式】 第一行是數m (n < 6 )。第二行有n個數,表示a[1]..a[n]。第三行有n個數,表示b[1]..b[n]。 【輸出格式】 僅有一行。若有解則輸出一條可行路線,否則輸出“NO ANSWER”。
標簽: 點陣
上傳時間: 2014-06-21
上傳用戶:llandlu
A simulated lexical analyser for HLL like C,PASCAL etc. I have given a sample text file from which the source code reads the dummy program n analyses it. The program can be extended by adding more.
標簽: simulated analyser lexical PASCAL
上傳時間: 2017-07-19
上傳用戶:redmoons