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

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告--雙向循環(huán)鏈表的創(chuàng)建及相關(guān)操作的實(shí)現(xiàn)-資料下載頁

2025-03-23 08:48本頁面
  

【正文】 0。 int w=0。 int i=0。 Scanner sc=new Scanner()。 (**請(qǐng)輸入要?jiǎng)?chuàng)建的圖的頂點(diǎn)的個(gè)數(shù)**)。 int vexCount=()。 (**請(qǐng)輸入頂點(diǎn)的值(輸入后按回車鍵)**)。 for(int j=0。jvexCount。j++){ VertexAnyType vertex=new VertexAnyType()。 AnyType next=(AnyType)()。 AnyType data=next。 =data。 vertexs[i++]=vertex。 vexNum++。 } //用于輸出頂點(diǎn)的值 for(int k=0。kvexNum。k++){ (vertexs[k].data)。 } (**輸入構(gòu)成邊的頂點(diǎn)的數(shù)值(輸入1時(shí)結(jié)束)**)。 while(v!=1||w!=1){ (**請(qǐng)輸入v頂點(diǎn)和頂點(diǎn)w的數(shù)值****)。 ((當(dāng)v,w的值為1結(jié)束)。 v=()。 w=()。 (請(qǐng)輸入邊的權(quán)值:)。 int weight=()。 if(v!=1||w!=1){ //for(int i=0。i++){ //輸入邊的信息,v,w為輸入的弧信息 Arc p= new Arc()。 //建立節(jié)點(diǎn) //if(!p) return ERROR。 =weight。 =v。 vertexs[w].arcNum++。 =vertexs[w].firstArc。 //頂點(diǎn)v的鏈表 vertexs[w].firstArc=p。 //添加到最左邊 } } } // public void addVex(AnyType v){ //if(v==null) //return null。 VertexAnyType vertex=new VertexAnyType(v)。 vertexs[vexNum]=vertex。 vexNum++。 } //增加邊 @SuppressWarnings(unchecked) public void addEdge(int start, int end){ Arc p=new Arc(end)。 =vertexs[start].firstArc。 vertexs[start].firstArc=p。 //Arc q=new Arc(start)。 //=vertexs[end].firstArc。 //vertexs[end].firstArc=q。 } @SuppressWarnings(unchecked) public void DFS(int v) { //遞歸深度優(yōu)先遍歷 int w=0。 // 從頂點(diǎn)v出發(fā),深度優(yōu)先搜索遍歷連通圖 vertexs[v].visited = true。 (vertexs[v].data)。 //對(duì)v的尚未訪問的鄰接頂點(diǎn)w遞歸調(diào)用DFS for(w=firstAdjVex(v)。w=0。w=nextAdjVex(v,w)) if (vertexs[w].visited==false) DFS(w)。 } @SuppressWarnings(unchecked) public void BFS(int v){ // 從頂點(diǎn)v出發(fā),廣度優(yōu)先搜索遍歷連通圖 int u,w。 ConcurrentLinkedQueueInteger Q=new ConcurrentLinkedQueueInteger()。 for ( v=0。 vvexNum。 v++ ){ if (vertexs[v].visited==false) { // v 尚未訪問 vertexs[v].visited=true。 // 訪問v (vertexs[v].data)。 } while (!()) { u=( )。 for(w=firstAdjVex(u)。 w=0。 w=nextAdjVex(u,w)) if (vertexs[w].visited==false) { vertexs[w].visited=true。 (vertexs[w].data)。 (w)。 // 訪問的頂點(diǎn)w入隊(duì)列 } } } } //刪除頂點(diǎn) public void DeleteVex(int v){ if(v0||vvexNum) (!!)。 else{ for(int i=v。ivexNum1。i++){ int j=i+1。 vertexs[i]=vertexs[j]。 } vexNum。 for(int i=0。ivexNum。i++){ Arc p=vertexs[i].firstArc。 Arc q=vertexs[i].firstArc。//q是為了記錄p的前一個(gè)邊節(jié)點(diǎn) while(p!=null){ if(==v){ if(p==vertexs[i].firstArc) q=。 else =。 } else if(v) =。 q=p。 p=。 } } } vexNum。 } //刪除邊 @SuppressWarnings(unchecked) public void DeleteArc(int v,int w){ Arc p。 p=vertexs[v].firstArc。 if(==w){ vertexs[v].firstArc=。 } else { while(!=null){ p=。 if(==w){ vertexs[v].firstArc=。 break。 } } } p=vertexs[w].firstArc。 if(==v){ vertexs[w].firstArc=。 } else { while(!=null){ p=。 if(==v){ vertexs[w].firstArc=。 break。 } } } } //節(jié)點(diǎn)的入度 public int degreeIn(int v){ int count=0。 Arc p=vertexs[v].firstArc。 while(p!=null){ count++。 p=。 } (第+v)。 return count。 } //節(jié)點(diǎn)的出度 public int degreeOut(int v){ int vd=0。 int count=0。 for(int i=0。ivexNum。i++){ Arc p=vertexs[i].firstArc。 while(p!=null){ if(==vd) count++。 p=。 } } (第+v)。 return count。 } //拓?fù)渑判? @SuppressWarnings(unchecked) public void DFSToplogicalSort(int v) { //如何確定v for(v=0。vvexNum。++v) vertexs[v].visited=false。 // 訪問標(biāo)志初始化 @SuppressWarnings(rawtypes) Stack s=new Stack()。 //存放頂點(diǎn),按照出DFS的次序 for (v=0。vvexNum。++v) { if (! vertexs[v].visited ) DFS(v)。 // 對(duì)尚未訪問的頂點(diǎn)調(diào)用DFS } while(!()) //輸出拓?fù)渑判虻慕Y(jié)果 (())。 }五、測(cè)試數(shù)據(jù)對(duì)每個(gè)函數(shù)的測(cè)試數(shù)據(jù)對(duì)程序整體的測(cè)試數(shù)據(jù)A、鄰接矩陣存儲(chǔ)B.六、測(cè)試情況結(jié) 論通過本次課程設(shè)計(jì),我知道了雙向循環(huán)鏈表的創(chuàng)建,樹的創(chuàng)建和樹的各項(xiàng)遍歷方式,圖的兩種創(chuàng)建方式以及圖的各項(xiàng)操作。其中在創(chuàng)建雙向循環(huán)鏈表時(shí),要注意每次添加節(jié)點(diǎn)時(shí)要把每次添加進(jìn)去的節(jié)點(diǎn)于頭結(jié)點(diǎn)構(gòu)成循環(huán)。參考文獻(xiàn)[1] 毛峽, 丁玉寬. 圖像的情感特征分析及其和諧感評(píng)價(jià)[J] .電子學(xué)報(bào), 2001, 29(12A) : : 19231927. [2] Ozgokmen T. M. , Johns W. E. , Peters H. , et al. Turbulent Mixing in the Red Sea Outflow Plume from a HighResoluting Nonhydrostatic Model[J] . Jounal of Physical Oceangraphy, 2003,V33(8) :18461869. [3] 劉國(guó)鈞, 王連成.圖書館史研究[M].北京:高等教育出版社, 1979:1550.[4] 毛峽.繪畫的音樂表現(xiàn)[A].中國(guó)人工智能學(xué)會(huì)2001年全國(guó)學(xué)術(shù)年會(huì)論文集[C].北京:北京郵電大學(xué)出版社, 2001:739740. [5] Mao Xia, et al. Analysis of Affective Characteristics and Evaluation of Harmonious Feeling of Image Based on 1/f Fluctuation Theory[A] .International Conference on Industrial amp。 Engineering Applications of Artificial Intelligence amp。 Expert Systems (IEA/AIE ) [C] . Australia Springer Publishing House,2002:1719.[6] 張和生. 地質(zhì)力學(xué)系統(tǒng)理論[D] .太原:太原理工大學(xué),1996.[7] 姜錫洲. 一種溫?zé)嵬夥笏幹苽浞桨竅P] . 中國(guó)專利:881056078, 19830812.[8] GB/T 16159—1996, 漢語拼音正詞法基本規(guī)則[S] . [9] 毛峽.情感工學(xué)破解“舒服”之迷[N] .光明日?qǐng)?bào), 2000417(B1) .[10]馮西橋.核反應(yīng)堆壓力容器的LBB分析[R] .北京: 清華大學(xué)核能技術(shù)設(shè)計(jì)研究院,1996.[11]王明亮.中國(guó)學(xué)術(shù)期刊標(biāo)準(zhǔn)化數(shù)據(jù)庫(kù)系統(tǒng)工程的[EB/OL] , 19980816/19981004.
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1