3-Dimensional Shortest Path
이전 댓글 표시
Hello, I have a question about the shortest path algorithm.
I want to find shortest path in 3 dimensional space(for example, latitude, longitude, and altitude) I think it's possible that using "graphshortestpath" function in matlab is fine.
But in this case it's hard to make a graph matrix and a edge matrix...
So if someone knows that an efficient way to make for shortest path algorithm for 3 dimensional space, please help me.
Thanks in advance!
채택된 답변
추가 답변 (1개)
Walter Roberson
2016년 3월 3일
0 개 추천
The A* and Dijkstra algorithms do not care at all about how many dimensions the graph is embedded in: they only care about the connection information and the distances (or the two combined in one.)
댓글 수: 3
Ahmet Cecen
2016년 3월 3일
편집: Ahmet Cecen
2016년 3월 3일
This is true, but graphshortestpath and similar functions will almost always require data in the form of an adjacency matrix, which is 2D. The problem here if I relate correctly is not that the graph is embedded in 3D, it is that there is no graph, simply volumetric data like a 3D maze for example: the corridors are 1s and walls are 0s. How do I transform that 3D maze into a 2D adjacency matrix in the most time and memory efficient way possible with MATLAB? That is the problem the submission I refer to solves. The rest is easy-peasy as you mentioned.
Helio
2016년 3월 3일
Steven Lord
2016년 3월 3일
The shortestpath method for graph and digraph objects that was introduced in release R2015b can work on a weighted graph object. There's an example on that function's documentation page.
카테고리
도움말 센터 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!