Return all ShortestPath explored nodes
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is there a way for me to get a list of all explored nodes in the function
shortestpath(G,s,t)
Or if there is a different way that I can get a list of all explored nodes in BFS and Dijkstra
0 comentarios
Respuestas (2)
Aparajith Raghuvir
el 7 de Jul. de 2021
I understand you need to get a list of all explored nodes in BFS and Djikstra's shortest path algorithms
You may run the following code
edit shortestpath
This would give you the source code of the shortestpath function that you may modify to extract the list of all explored nodes
4 comentarios
Bruno Luong
el 7 de Jul. de 2021
Aparajith Raghuvir have you tried it? The shortestpath file is a wrapper, the algorithm (such as bfsShortestPaths) seems to run on non-m file.
Aparajith Raghuvir
el 8 de Jul. de 2021
Oh, if that is the case then unfortunately you may need to code the algorithms yourself to get all nodes that were explored as part of it.
Bruno Luong
el 7 de Jul. de 2021
Editada: Bruno Luong
el 7 de Jul. de 2021
This problem has been answered in this thread
0 comentarios
Ver también
Categorías
Más información sobre Dijkstra algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!