Find all paths in a graph with distance, previous nodes
3 次查看(过去 30 天)
显示 更早的评论
Dear all,
I am working on traffic assignment problems. I have a distance matrix.
for example,
A=[0 inf inf
15 0 20
10 inf 0];
the distance from node 1 to node 2 is 15, node 3 to node 2 is 20 and node 1 to node 3 is 10.
But I need to determine the all possible paths from one source node to all other nodes.
Please help me matlab code to arrive the distances, previous nodes.
Thanks in advance.
Muthukannan
0 个评论
回答(1 个)
Bruno Luong
2022-9-3
It is not clear what you want to achieve but you might take a look at this function
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dijkstra algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!