Fix the initial edges in graph_adjacency_matrix

This commit is contained in:
krahets
2023-02-09 23:12:28 +08:00
parent 08b7474894
commit b973c86ee4
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ enum GraphAdjacencyMatrix {
/* */
// edges vertices
let vertices = [1, 3, 2, 5, 4]
let edges = [[0, 1], [0, 2], [1, 2], [2, 3], [0, 3], [2, 4], [3, 4]]
let edges = [[0, 1], [1, 2], [2, 3], [0, 3], [2, 4], [3, 4]]
let graph = GraphAdjMat(vertices: vertices, edges: edges)
print("\n初始化后,图为")
graph.print()