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

Stop early in Bellman-Ford #84

Merged
merged 1 commit into from
Aug 3, 2014

Conversation

eush77
Copy link
Contributor

@eush77 eush77 commented Aug 2, 2014

If the current iteration finds no shorter paths, then it is safe to stop. This optimization also makes it possible to include the extra iteration in the main loop.

This also eliminates the need for a separate extra iteration.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling a3264ae on eush77:bellman-ford-early-stop into a2d30b0 on felipernb:master.

felipernb added a commit that referenced this pull request Aug 3, 2014
@felipernb felipernb merged commit bf5489c into felipernb:master Aug 3, 2014
@eush77 eush77 deleted the bellman-ford-early-stop branch August 3, 2014 16:19
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.

3 participants