Is there an easy way to apply alghoritm shortest path in lens c?

I have a sequence of points (x, y) connected by a track. Is there a simple way in object c to apply something like the shortest path Dijkstra alghoritm to find out the shortest path between two variable points from them? The real problem is that I have an image with a number of locations on it and the coordinate of this entire location. Now I need the user to select two of this location and get the shortest path between the selected location.

+3
source share
2 answers

I found a way to do this. There is a perfect implementation of the algorithm. Hope this helps someone.

https://github.com/snyderp/PESGraph

+4
source

You can find the algorithm online in C or C ++ and manipulate it to enter your list type, and display the shortest list of waypoints, so you do not need to implement the actual algorithm, just manipulate the set of code that already exists.

+1
source

All Articles