Hello,
I have string vertices in a weighted undirected graph. I created edges doing AddEdge(from: "name1", to: "name2", weight: xx). When i run BFS/DFS and print the list of edges i get back, the u and v fields are ints. I assume this is the index of the vertices. Is there a way to get the string name associated with the vertex at this point?
Thanks.
Hello, I have string vertices in a weighted undirected graph. I created edges doing AddEdge(from: "name1", to: "name2", weight: xx). When i run BFS/DFS and print the list of edges i get back, the u and v fields are ints. I assume this is the index of the vertices. Is there a way to get the string name associated with the vertex at this point? Thanks.