-
Notifications
You must be signed in to change notification settings - Fork 17
Fix Prim's algorithm implementation and update tests #41
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
Conversation
Thanks for the PR. What is reconstructMST? |
Hi @Ducasse, I think I made a mistake in naming the method here, In prim's algo MST edges are already computed and stored, so there’s no need to "reconstruct" them. Do you think I should name it as something like getMSTEdges ( Here MST stands for Minimum Spanning Tree ) or getTreeEdges. |
I would call them minimumSpanningTreeEdges (get feels like a Java hack). Now I do not get the name of the variable because does it returns a tree or edges?
|
Thnx @Ducasse, I have renamed the variables. Please have a look whenever you get time. |
Nice refactor :) Thanks for your PR @Alokih |
BTW we have a failing CI (it is not your fault). I believe it can be a good exercise for you if you can make a PR to have all the CIs green. Of course, only if it interest you. What do you think @Alokih ? |
For sure @jordanmontt I am working on it. Thnx |
@jordanmontt I tested the workflow run on my fork repo & found 2 main issues :
|
Hello @Alokih
I fixed those 2 things and know we have a green CI. Thanks for your investigation!! |
Glad I could help ! @jordanmontt Happy to see CI green now 🎉 |
Fixes: #28
Description:
This PR fixes the implementation of Prim's algorithm to align with the API conventions.
run
method.reconstructMST
method to retrieve the edges.reconstructMST
instead of relying on the return value ofrun
.