-
Notifications
You must be signed in to change notification settings - Fork 45
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
Added the negative cycle detection in bellman ford #97
Conversation
and relevant unit tests too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! Thank you for creating your first pull-request on the Graaf library :)
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, looks very good already!
Should be almost ready to merge, just some minor comments.
Let me know what you think.
Co-authored-by: Bob Luppes <[email protected]>
Co-authored-by: Bob Luppes <[email protected]>
Hey, Thanks for the detailed review, I have committed all the above changes. Let me know if any more changes are needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Congrats on the first contribution :)
This PR solves the #76 issue.
I have added the code for detecting a Negative cycle in Bellman Ford Shortest Path Algorithm and I have also added a unit test to test the logic in the test directory.
I did an additional pass over the edges and if there is any change detected ,An Invalid Argument exception is thrown.
"A Negative cycle has been detected in the graph".The unit test checks if this exception is thrown for a negative cycle and all the tests are passed too.