?? expectedoutputsearchgraphlinkedrepuos.txt
字號(hào):
Capacity: 8
Number of vertices: 8
Number of edges: 13
At Vertex 4: 4
4's index: 4
At Vertex 8: 8
All of the Vertices:
1, 2, 3, 4, 5, 6, 7, 8,
All of 1's edges:
(1,3) (2,1) (7,1)
Graph before searches:
8
1 : 3 2 7 0
2 : 1 7 8 0
3 : 1 4 5 7 0
4 : 3 0
5 : 3 7 8 6 0
6 : 5 8 0
7 : 2 3 5 1 8 0
8 : 5 7 2 6 0
After making edges between 1 and every other vertex including itself:
8
1 : 3 2 7 1 1 2 3 4 5 6 7 8 0
2 : 1 7 8 1 0
3 : 1 4 5 7 1 0
4 : 3 1 0
5 : 3 7 8 6 1 0
6 : 5 8 1 0
7 : 2 3 5 1 8 1 0
8 : 5 7 2 6 1 0
All of 1's edges:
(1,3) (2,1) (7,1) (1,1) (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8)
After deleting Vertex 7:
7
1 : 3 2 1 1 2 3 4 5 6 8 0
2 : 1 8 1 0
3 : 1 4 5 1 0
4 : 3 1 0
5 : 3 8 6 1 0
6 : 5 8 1 0
8 : 5 2 6 1 0
At Edge 3->4 exists?: true
Get Edge 3->4: (3,4)
After another vertex insertion:
8
1 : 3 2 1 1 2 3 4 5 6 8 0
2 : 1 8 1 0
3 : 1 5 1 0
4 : 1 0
5 : 3 8 6 1 0
6 : 5 8 1 0
7 : 0
8 : 5 2 6 1 0
cannot insert 4 since that index exists
Empty?false
Wiped out--Empty?true
Testing Search Features
Depth first search:
1
(1,3)
3
(1,3)
(3,4)
4
(3,4)
(3,5)
5
(3,5)
(5,7)
7
(2,7)
2
(2,1)
(2,7)
(8,2)
8
(5,8)
(7,8)
(8,2)
(8,6)
6
(6,5)
(8,6)
(3,7)
(5,7)
(7,1)
(7,8)
(5,8)
(6,5)
(3,7)
(2,1)
(7,1)
Breadth first search:
1 reached
1
(1,3) 3 reached
(2,1) 2 reached
(7,1) 7 reached
3
(1,3)
(3,4) 4 reached
(3,5) 5 reached
(3,7)
2
(2,1)
(2,7)
(8,2) 8 reached
7
(2,7)
(3,7)
(5,7)
(7,1)
(7,8)
4
(3,4)
5
(3,5)
(5,7)
(5,8)
(6,5) 6 reached
8
(5,8)
(7,8)
(8,2)
(8,6)
6
(6,5)
(8,6)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -