- UID
- 992783
- 主题
- 303
- 阅读权限
- 70
- 帖子
- 8742
- 精华
- 5
- 积分
- 6963
- 金钱
- 34339
- 荣誉
- 155
- 人气
- 373
- 在线时间
- 6211 小时
- 评议
- 0
- 帖子
- 8742
- 精华
- 5
- 积分
- 6963
- 金钱
- 34339
- 荣誉
- 155
- 人气
- 373
- 评议
- 0
|
前言:Utility and Library多是些遊戲內的數據查找、對比用...。但由於個人的沒修電腦程式學科,基本是不理解、不懂運用以下的腳本,故翻譯質素極低(可讀性為零)。還是請有意深研的人,自行上官網查閱...
名稱:Array/Matrix Sorts (列陣/矩陣分類)
製作人:s9ilent
版本號:1
發表日期:25/01/09
下載連結:http://members.optuszoo.com.au/whyisthat/scripts/array_sorts.zip
Egosoft forum連結:http://forum.egosoft.com/viewtopic.php?t=233799
介紹翻譯:完全看不明,純引:
All sorts are numerical!!! (as opposed to X3's string based one...why?!)
lib.array.insertsort --- Your basic insertion sort, is stable, single array
lib.array.quicksort --- Basic quick sort, is not stable, single array, is better then insertion sort if you can pick a better pivot (apparently?)
lib.array.quicksort.recursive --- DONT CALL THIS ONE!!! call the other one
lib.array.insertsort.matrix --- Insertion sort, is stable, does a matrix, max sort by 2 columns (optional sort up, sort down)
Notes on the matrix sort
Leave col2 blank to sort by just col1
Garbage in Garbage out. It returns null if your matrix is not correctly sized (all columns are equal in size)
Array[C][R], Column, Row (C-> R, Alphabetical order). Don't get them confused!!!
-Alternatively, think like this: An array is a single column, an array of an array, is a whole lot of columns, ie. a row of columns. Thus, as you go DOWN a row, your going down the Inner array, so array[][down here]. So the second one is the row.
-Or just look at excel, it uses Column Row too (A1, B3, etc)
[ 本帖最后由 ygat 于 2010-2-23 21:51 编辑 ] |
|