-
Notifications
You must be signed in to change notification settings - Fork 12
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
Balance edges algos separate file #96
Conversation
Codecov Report
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 91.18% 90.10% -1.08%
==========================================
Files 12 13 +1
Lines 771 667 -104
==========================================
- Hits 703 601 -102
+ Misses 68 66 -2
Continue to review full report at Codecov.
|
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.
|
||
*Returns* a BitSet of edges that form a mst. | ||
""" | ||
function random_kruskal_mst(graph::BaseGraph, |
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.
I like the functions being split like this! Clean and concise and easy to understand. Yay!
|
||
""" Refer to test/graph.jl to see the test graph being loaded | ||
""" | ||
|
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.
Could we also write a tiny test for the kruskal_mst
method if it's not too much trouble? 😄
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.
of course!!! thanks for keeping me honest
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.
done and passed!
The currently used balanced edge algorithm are in a new file,
balance_edges.jl
.Made a corresponding test file.
Changed the name of
weighted_kruskal_mst()
torandom_kruskal_mst()
and made the latter take the latter generate the random weights.I introduced no new code, only renamed functions and introduced 2 new files, and moved some previously written code into them.
All of these changes are derived from #94 , but that PR is a bit too big, and has some type changes so this is the first in what I foresee about 5 small PRs that will comprise the changes in #94.