⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testgraphsearchmethods.output

📁 这是数据结构、算法与应用-C++语言描述的代码
💻 OUTPUT
字号:
Enter number of edges in graph
Enter weighted edge 1
Enter weighted edge 2
Enter weighted edge 3
Enter weighted edge 4
Enter weighted edge 5
Enter weighted edge 6
Graph 0 is
Number of Vertices = 7
Number of Edges = 6
0  1  1  0  0  0  0  
1  0  0  0  0  0  0  
1  0  0  0  0  0  0  
0  0  0  0  1  0  0  
0  0  0  1  0  1  1  
0  0  0  0  1  0  1  
0  0  0  0  1  1  0  


Graph 1 is
Number of Vertices = 7
Number of Edges = 6
0  1  1  0  0  0  0  
0  0  0  0  0  0  0  
0  0  0  0  0  0  0  
0  0  0  0  1  0  0  
0  0  0  0  0  1  0  
0  0  0  0  0  0  0  
0  0  0  0  1  1  0  


Graph 2 is
Number of Vertices = 7
Number of Edges = 6
3  2  
1  
1  
5  
7  6  4  
7  5  
5  6  


Graph 3 is
Number of Vertices = 7
Number of Edges = 6
3  2  


5  
6  

5  6  


Graph 4 is
Number of Vertices = 7
Number of Edges = 6
0  9  9  0  0  0  0  
9  0  0  0  0  0  0  
9  0  0  0  0  0  0  
0  0  0  0  9  0  0  
0  0  0  9  0  9  9  
0  0  0  0  9  0  9  
0  0  0  0  9  9  0  


Graph 5 is
Number of Vertices = 7
Number of Edges = 6
0  9  9  0  0  0  0  
0  0  0  0  0  0  0  
0  0  0  0  0  0  0  
0  0  0  0  9  0  0  
0  0  0  0  0  9  0  
0  0  0  0  0  0  0  
0  0  0  0  9  9  0  


Graph 6 is
Number of Vertices = 7
Number of Edges = 6
3 9   2 9   
1 9   
1 9   
5 9   
7 9   6 9   4 9   
7 9   5 9   
5 9   6 9   


Graph 7 is
Number of Vertices = 7
Number of Edges = 6
3 9   2 9   


5 9   
6 9   

5 9   6 9   


Doing bfs
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 

Doing dfs
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 
Reached values for vertices are 1 1 1 2 2 2 2 
Reached values for vertices are 1 1 1 2 2 2 0 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -