devenbhooshan / graph.js

A liteweight javascript graph algorithms library.
MIT License
127 stars 42 forks source link

dijkstra for all paths #13

Open ludoo0d0a opened 8 years ago

ludoo0d0a commented 8 years ago

It woudl be great if dijkstra could returns all shortest paths, in case where weights are equals.

switchkiller commented 8 years ago

@ludoo0d0a using dijkstra for equal weight edges would not be efficient enough. Instead we could use bfs with less time complexity. However we can't find paths for negative weight graph (correctness of dijsktra)