node-dijkstra
node-dijkstra copied to clipboard
Find all shortest paths
Is it possible to return all shortest paths in the case that there is more than one path with the same (minimal) cost?
I can't think of any easy way.
Given that this implementation uses a couple of optimizations to be the fastest possible, it never attempts to calculate any second paths, it exclusively considers the first least-costly path
I can see that. Speed is a reasonable goal for what Dijkstra is used for.
Are there benchmarks for this library against others?
I didn't do any, not sure if somebody in the community did.
If you feel like doing them, feel free to open a PR to update the README with the results 👍
I've gone for an internal implementation (https://github.com/retorquere/zotero-erdos/blob/master/content/dijkstra.ts)
I'll close this issue given that I think find all path will impact perforce of finding the shortest, and this library focuses on this last use-case.