mburst / dijkstras-algorithm

Implementations of Dijkstra's shortest path algorithm in different languages
523 stars 203 forks source link

How can I calculate the distance. #17

Closed brunoheringer closed 6 years ago

brunoheringer commented 6 years ago

I need to calculate the path and the distance in C#. How can I do this?

mburst commented 6 years ago

Use https://github.com/mburst/dijkstras-algorithm/blob/master/dijkstras.cs and just modify it to return the distance between each of the nodes once you find the shortest path