Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shortestPathTo by correct selection of tentative node #10

Merged
merged 3 commits into from
Jul 30, 2013
Merged

Fix shortestPathTo by correct selection of tentative node #10

merged 3 commits into from
Jul 30, 2013

Conversation

fiadliel
Copy link
Contributor

Dijkstra's algorithm requires that we visit nodes in order of least tentative distance. A bug in the code meant that the ordering was different, and some incorrect paths were reported.

Also, the algorithm takes a very long period of time to run on larger graphs, if we process already visited nodes (a node may now be in the priority queue many times). So these visited nodes should not be processed again.

@peter-empen peter-empen merged commit bc99aea into scala-graph:master Jul 30, 2013
@peter-empen
Copy link
Contributor

Thank you, Gary. It works like a charm.
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants