freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于姓名排序算法動(dòng)態(tài)演示系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)畢業(yè)設(shè)計(jì)說(shuō)明書(shū)(編輯修改稿)

2024-07-24 20:56 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 別就每個(gè)子序列對(duì)關(guān)鍵字K1進(jìn)行排序,按K1值得不同再分成若干更小的子序列,依次重復(fù)直至每個(gè)子序列中都有相同的關(guān)鍵字[1]。 MSD排序示例(2) 算法描述對(duì)字符串順序鏈表data每個(gè)關(guān)鍵字第power的字符比較排序,返回值為空。public void msd(String[] data, int power) { String[][] temp = new String[26][]。 int[] order = new int[26]。 int pos = 0。 int k = 0。 if (power 0) return。 for (int i = 0。 i 。 i++) { if (data[i] == null || .equals(data[i])) break。 if (power data[i].length()) { pos = (int) data[i].charAt(power) 97。 } else { pos = 0。 } temp[pos][order[pos]] = data[i]。 order[pos]++。 } ++power。 for (int i = 0。 i 26。 i++) { if (order[i] 1 amp。amp。 power getStringMaxLength(temp[i])) { (1)。 msd(temp[i], power)。// msd in every sibling bucks } } for (int i = 0。 i 26。 i++) { for (int j = 0。 j 。 j++) { if (temp[i][j] != null) { data[k++] = temp[i][j]。// regain the sorted numbers } } } }(3) 時(shí)間復(fù)雜度分析對(duì)于n個(gè)記錄(假設(shè)每個(gè)記錄含d個(gè)關(guān)鍵字,每個(gè)關(guān)鍵字的取值范圍為rd個(gè)值),時(shí)間復(fù)雜度為O(d(n+rd)),其中每一趟分配的時(shí)間復(fù)雜度為O(n),輔助存儲(chǔ)O(rd)。 3系統(tǒng)設(shè)計(jì)根據(jù)需求分析,按功能劃分8個(gè)模塊,分別是:鏈表插入排序模塊、直接插入排序模塊、折半插入排序模塊、選擇排序模塊、歸并排序模塊、堆排序模塊、基數(shù)排序模塊。排序算法動(dòng)態(tài)演示系統(tǒng)鏈




序直




序折




序交


序選


序歸


序堆

序基
數(shù)

序 系統(tǒng)模塊結(jié)構(gòu)圖 模塊算法流程圖(1) 直接插入排序。 直接插入排序算法流程圖(2) 折半插入排序。 折半插入排序算法流程圖(3) 選擇排序。 選擇排序算法流程圖(4) 快速排序。 快速排序算法流程圖(5) 歸并排序。 歸并排序算法流程圖(6) 堆排序。 堆排序算法流程圖(7) 鏈表插入排序。 鏈表插入排序算法流程圖(8) 基數(shù)(MSD)排序基數(shù)(MSD)。 基數(shù)MSD排序算法流程圖 4實(shí)現(xiàn) 直接插入排序?qū)⒆址當(dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù);()切入到排序代碼中,完成數(shù)組拷貝與賦值。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下:public void insertSortToShow(String[] src, int index) { units = (src)。 ().setUnits(units)。 if ((src[index]).pareTo(HanziToPinyin. getPingYin(src[index 1])) 0) { src[0] = src[index]。 //數(shù)組拷貝及代碼跟隨 src[index] = src[index 1]。 int j = index 2。 for (。 (src[0]).pareTo(HanziToPinyin. getPingYin(src[j])) 0。 j) { //找出插入位置 } src[j + 1] = src[0]。 //src[0]插入到插入位置 } repaintUnit(500)。 } 折半插入排序?qū)⒆址當(dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù);()切入到排序代碼中,完成數(shù)組拷貝與賦值;initUnits(units,low,high)切入到排序代碼中完成折半查找過(guò)程的繪制。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下: public void binaryInsertionSortToShow(String[] src, int index) { units = (src)。 // 獲取顯示數(shù)據(jù) ().setUnits(units)。 //將src[i]暫存在src[0] src[0] = src[index]。 //數(shù)組拷貝及代碼跟隨 int low = 1, high = index 1。 //代碼跟隨 ().setSelectIndexs(new int[]{2})。 // 在src[low...high]中折半查找 (units)。 // 初始化Units initUnits(units, low, high)。 // 延遲time后重繪 repaintUnit(1000)。 while (low = high) { ......找出插入位置 } ().repaint()。 // 記錄后移 for (int j = index 1。 j = high + 1。 j) { ......記錄后移 } ......將src[0]插入到指定位置 }將字符串?dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù);()切入到排序代碼中,完成數(shù)組拷貝與賦值。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下:public void selectSortToShow(String[] src, int index) throws SortPlayingException { units = (src)。 // 獲取顯示數(shù)據(jù) ().setUnits(units)。 //代碼跟隨 ().setSelectIndexs(new int[]{1})。 int j = selectMinKeyToShow(src, index)。 if (j != index) { String temp = src[index]。 src[index] = src[j]。 src[j] = temp。 //代碼跟隨 ().setSelectIndexs(new int[]{3,4,5})。 changeUnit(units, index, j)。 } }將字符串?dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù);()切入到排序代碼中,完成數(shù)組拷貝與賦值。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下:public int partitionToShow(String[] l,int low,int high) { (500)。 //用字表的第一個(gè)記錄軸的記錄 l[0] = l[low]。 //代碼跟隨 ().setSelectIndexs(new int[]{1})。 (units,(low),(0))。 //顯示內(nèi)存處理 //軸記錄關(guān)鍵字 String pivotkey = l[low]。 //代碼跟隨 ().setSelectIndexs(new int[]{2})。 //從表的兩端交替向中間掃描 while(low high) { ......從表的兩端交替向中間掃描 } ......將l[0]插入到指定位置 return low。 }將字符串?dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù);將movingUnit()完成數(shù)組的移動(dòng)與交換。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下:private void mergeToShow(String[] sr,int s,int m,int t) { String[] tmp = new String[t s +1]。 //臨時(shí)數(shù)據(jù)存儲(chǔ) VectorUnit tmpUnits = new VectorUnit(ts+1)。 int curx = (s).getPoint().x。 int i=s, k = 0,j = m+1。 //代碼跟隨 ().setSelectIndexs(new int[]{2})。 for(。i=m amp。amp。 j = t。k++) { ......將sr[i...m] 和sr[j...t]歸并 }//for end if(i = m) //將剩余的sr[i...m]復(fù)制到tmp中 { ......將剩余的sr[i...m]復(fù)制到tmp中 }//if end if(j = t) //將剩余的sr[j...t]復(fù)制到tmp中 { .....將剩余的sr[j...t]復(fù)制到tmp中 }//if end (tmp, 0, sr, s, )。 //代碼跟隨 ().setSelectIndexs(new int[]{20})。 movingUnitList(units,tmpUnits,s,t)。 }將字符串?dāng)?shù)組封裝為L(zhǎng)inkData,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù)。將moveArrows()切入到排序代碼中,完成箭頭的移動(dòng);flashNext()切入到排序代碼中完成next索引選擇處理效果。AccessoryPanel(右邊JPanel)中加入JList,(int[]i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下:public void updateNextToShow(Node[] nodes, int i, int ibefore) { ......初始化i、q、p while ((nodes[i].getValue()).pareTo( (nodes[p].getValue())) 0) { ......找出插入的位置 } //代碼跟隨 ().setSelectIndexs(new int[]{8})。 flashNext(linkData, q)。 // q next修改 nodes[q].setNext(i)。 ()[q].setValue(i + )。 //代碼跟隨 ().setSelectIndexs(new int[]{9})。 flashNext(linkData, i)。 // q next修改 nodes[i].setNext(p)。 ()[i].setValue(p + )。 }將字符串?dāng)?shù)組封裝為VectorUnit,同時(shí)利用GUI在ContentPanel(中間JPanel)中繪制數(shù)據(jù)。()切入到排序代碼中,完成數(shù)組拷貝與賦值。AccessoryPanel(右邊JPanel)中加入JList,(int[] i)完成代碼跟隨。().setSelectIndexs(new int[]{})。該方法切入到排序代碼完成排序算法每一步實(shí)現(xiàn)效果。實(shí)現(xiàn)代碼如下: pu
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1