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

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)課程設(shè)計報告--雙向循環(huán)鏈表的創(chuàng)建及相關(guān)操作的實現(xiàn)(參考版)

2025-01-21 21:52本頁面
  

【正文】 Engineering Applications of Artificial Intelligence amp。其中在創(chuàng)建雙向循環(huán)鏈表時,要注意每次添加節(jié)點時要把每次添加進去的節(jié)點于頭結(jié)點構(gòu)成循環(huán)。 // 對尚未訪問的頂點調(diào)用DFS } while(!()) //輸出拓?fù)渑判虻慕Y(jié)果 (())。vvexNum。 // 訪問標(biāo)志初始化 SuppressWarnings(rawtypes) Stack s=new Stack()。vvexNum。 return count。 p=。i++){ Arc p=vertexs[i].firstArc。 for(int i=0。 } //節(jié)點的出度 public int degreeOut(int v){ int vd=0。 } (第+v)。 while(p!=null){ count++。 } } } } //節(jié)點的入度 public int degreeIn(int v){ int count=0。 if(==v){ vertexs[w].firstArc=。 if(==v){ vertexs[w].firstArc=。 break。 } else { while(!=null){ p=。 p=vertexs[v].firstArc。 } } } vexNum。 q=p。 else =。 Arc q=vertexs[i].firstArc。ivexNum。 } vexNum。i++){ int j=i+1。 else{ for(int i=v。 (w)。 w=nextAdjVex(u,w)) if (vertexs[w].visited==false) { vertexs[w].visited=true。 for(w=firstAdjVex(u)。 // 訪問v (vertexs[v].data)。 vvexNum。 ConcurrentLinkedQueueInteger Q=new ConcurrentLinkedQueueInteger()。w=nextAdjVex(v,w)) if (vertexs[w].visited==false) DFS(w)。 //對v的尚未訪問的鄰接頂點w遞歸調(diào)用DFS for(w=firstAdjVex(v)。 // 從頂點v出發(fā),深度優(yōu)先搜索遍歷連通圖 vertexs[v].visited = true。 //vertexs[end].firstArc=q。 //Arc q=new Arc(start)。 =vertexs[start].firstArc。 vexNum++。 VertexAnyType vertex=new VertexAnyType(v)。 //頂點v的鏈表 vertexs[w].firstArc=p。 vertexs[w].arcNum++。 =weight。i++){ //輸入邊的信息,v,w為輸入的弧信息 Arc p= new Arc()。 int weight=()。 w=()。 ((當(dāng)v,w的值為1結(jié)束)。 } (**輸入構(gòu)成邊的頂點的數(shù)值(輸入1時結(jié)束)**)。kvexNum。 vexNum++。 =data。 AnyType next=(AnyType)()。jvexCount。 (**請輸入頂點的值(輸入后按回車鍵)**)。 (**請輸入要創(chuàng)建的圖的頂點的個數(shù)**)。 int i=0。 //添加到最左邊 } } } //創(chuàng)建一個無向網(wǎng) public void createUDN(){ int v=0。 =vertexs[w].firstArc。 =v。 //建立節(jié)點 //if(!p) return ERROR。 if(v!=1||w!=1){ //for(int i=0。 (請輸入權(quán)值:)。 v=()。 while(v!=1||w!=1){ (**請輸入v頂點和頂點w的數(shù)值****)。k++){ (vertexs[k].data)。 } //用于輸出頂點的值 for(int k=0。 vertexs[i++]=vertex。 AnyType data=next。j++){ VertexAnyType vertex=new VertexAnyType()。 for(int j=0。 int vexCount=()。 Scanner sc=new Scanner()。 int w=0。 //頂點v的鏈表 vertexs[v].firstArc=p。 vertexs[v].arcNum++。 //建立節(jié)點 //if(!p) return ERROR。 w=()。 vertexs[i].data = data。ivexNum。 (請輸入字符:)。 //添加到最左邊 //} } } } //創(chuàng)建一個無向圖 SuppressWarnings(unchecked) public void createUDG( ){ int v=0,w=0。 =vertexs[w].firstArc。 =v。i++){ //輸入邊的信息,v,w為輸入的弧信息 Arc p= new Arc()。 w=()。 while(v!=1||w!=1){ (請輸入頂點和w的數(shù)值:)。k++){ (vertexs[k].data)。 } for(int k=0。 vertexs[i++]=vertex。 AnyType data=next。j++){ VertexAnyType vertex=new VertexAnyType()。 for(int j=0。 int vexCount=()。 Scanner sc=new Scanner()。 int w=0。 default:。 case 3: createUDN( )。 case 2: createDN( )。 case 1: createUDG( )。graphKind=0) { switch(graphKind){ case 0: createDG( )。 if(graphKind4amp。 (請輸入:)。 (\t+0:DG(有向圖)+\t+1:UDG(無向圖)+\t+2:DN(有向網(wǎng))+\t+3:UDN(無向網(wǎng)):)。 } // public void createGraph( ){ Scanner sc=new Scanner()。 //w之后的下一個鄰接點 if(p!=null) return 。 != w){ p=。 //v的第1個鄰接 while(p!=null amp。 //無鄰接點 return 。 p=vertexs[v].firstArc。 vexNum++。 SuppressWarnings(rawtypes) Vertex[ ] vertexs=new Vertex[509]。import 。import 。 } public void setNextArc(Arc nextArc){ = nextArc。 } public void setAdjVex(int adjVex) { = adjVex。 =null。 =nextArc。 nextArc=null。 Arc nextArc。 } public void setFirstArc(Arc firstArc) { = firstArc。 } public void setData(AnyType data) { = data。 =arc。 =arc。 =null。 =null。 boolean visited=false。 Arc firstArc。 ()。k++){ (vertex[k].data)。 for(int k=0。 } i++。j++) { (edgesArray[i][j]+\t)。 while(isize){ //相當(dāng)于打印了size行 for(int j=0。 } public void print(int size){ int i=0。 } (size)。 int edge2=()。k++){ (請輸入頂點的位置)。 for(int k=0。 } (請輸入邊的條數(shù):(邊的數(shù)目))。 String data=()。isize。j++){ edgesArray[i][j]=false。i++){ for(int j=0。 for(int i=0。 vertex=new Vertex[size]。 (請輸入頂點的個數(shù):)。 boolean edgesArray[][]。 } } private class EdgeAnyType{ } static int size。 private Vertex(){ =null。import 。(0,1,2,...),從而把每一個頂點的鄰接點添加到一個鄰接鏈表中有幾個節(jié)點就有幾個鄰接頂點。 輸出圖的深度優(yōu)先遍歷序列或廣度優(yōu)先遍歷序列(5分) 求圖的深度優(yōu)先或廣度優(yōu)先的生成樹(或生成森林)(存儲結(jié)構(gòu)為孩子兄弟鏈表),并對生成樹進行遍歷(15分) 判斷圖的連通性,輸出連通分量的個數(shù)(5分) 判斷圖中是否存在環(huán),無向圖5分,有向圖10分 給出頂點u和v,判斷u到v是否存在路徑(5分)求頂點u到v的一條簡單路徑(10分)1求頂點u到v的所有簡單路徑(15分)1求頂點u到v的最短路徑(10分)1求頂點u到其余各頂點的最短路徑(15分)1求任兩個頂點之間的最短路徑(15分)1求最小生成樹(15分)設(shè)計內(nèi)容與步驟 設(shè)計存儲結(jié)構(gòu) 設(shè)計算法 編寫程序,進行調(diào)試 總結(jié)并進行演示、講解設(shè)計工作計劃與進度安排根據(jù)自己選作的題目,給出完成每項工作的時間表,包括起止時間、工作內(nèi)容、地點設(shè)計考核要求 考勤20% 課程設(shè)計說明書50% 成果展示30%指導(dǎo)教師(簽字): 教研室主任(簽字)21圖的創(chuàng)建及相關(guān)操作的實現(xiàn)一、問題描述用圖示的方法描述所處理的圖的形態(tài)V1V2V3V4二、數(shù)據(jù)結(jié)構(gòu)針對所處理的圖: 畫出2種存儲結(jié)構(gòu) a、 A B C D
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1