Implementations are for learning purposes only. They may be less efficient than the implementations in the Python standard library. Use them at your discretion.
Read through our Contribution Guidelines before you contribute.
We are on Discord and Gitter! Community channels are a great way for you to ask questions and get help. Please join us!
See our directory for easier navigation and a better overview of the project.
This is a template for your report. You are free to modify it as needed. It is not required to use markdown for your report either, but the report has to be delivered in a standard, cross-platform format.
Name: The Algorithms - Python
URL: https://github.com/TheAlgorithms/Python
Python library containing implementations of various algorithms.
Did it build and run as documented?
See the assignment for details; if everything works out of the box, there is no need to write much here. If the first project(s) you picked ended up being unsuitable, you can describe the "onboarding experience" for each project, along with reason(s) why you changed to a different one.
- What are your results for ten complex functions?
- 1: _remove_repair (lines 212-283) (CCN: 31)
- 2: canny (lines 21-113) (CCN: 26)
- 3: points_to_polynomial (lines 1-103) (CCN: 21)
- 4: next_term (lines 21-107) (CCN: 20)
- 5: solution (lines 95-149) (CCN: 20)
- 6: bidirectional_dij (lines 20-107) (CCN: 20)
- 7: search (lines 12-74) (CCN: 20)
- 8: inverse_of_matrix (lines 8-155) (CCN: 20)
- 9: move (lines 155-210) (CCN: 19)
- 10: find_optimal_binary_search_tree (lines 68-134) (CCN: 19)
Q: Did all methods (tools vs. manual count) get the same result?
A: We chose to manually count 5 functions as follows:
- Canny: Same results
- Optimal binary search tree: Same results
- Search: Not the same results. Lizard got 20 and we counted 21.
- Inverse of matrix: Not the same results. Lizard got 20 while we got differing results. We eventually counted it manually together as a whole group but could still not get the same result as lizard.
- Bidirectional dijkstra's: Same as with the case of the "Inverse of matrix" above.
Q: Are the functions just complex, or also long?
A: Some functions are "long" (around 100 lines) while some are shorter (around 50 lines). The functions did not seem too complex, in the sense of having nested loops, etc.
Q: What is the purpose of the functions?
A: The purpose of the functions are to implement different kinds of algorithms. The names of the functions are self-explanatory and thus explains the purpose of the functions well.
Q: Are exceptions taken into account in the given measurements?
A: We took exceptions into account when counting manually.
Q: Is the documentation clear w.r.t. all the possible outcomes?
A: Not quite. In most functions it is not documented why an error was raised, for example. Also, there is mostly no documentation to if-statements that explains why a certain path is taken or not.
Plan for refactoring complex code:
Estimated impact of refactoring (lower CC, but other drawbacks?).
Carried out refactoring (optional, P+):
git diff ...
Document your experience in using a "new"/different coverage tool.
How well was the tool documented? Was it possible/easy/difficult to integrate it with your build environment?
Show a patch (or link to a branch) that shows the instrumented code to gather coverage measurements.
The patch is probably too long to be copied here, so please add the git command that is used to obtain the patch instead:
git diff ...
What kinds of constructs does your tool support, and how accurate is its output?
-
How detailed is your coverage measurement?
-
What are the limitations of your own tool?
-
Are the results of your tool consistent with existing coverage tools?
Show the comments that describe the requirements for the coverage.
Report of old coverage: [link]
Report of new coverage: [link]
Test cases added:
git diff ...
Number of test cases added: two per team member (P) or at least four (P+).
Current state according to the Essence standard: ...
Was the self-assessment unanimous? Any doubts about certain items?
How have you improved so far?
Where is potential for improvement?
What are your main take-aways from this project? What did you learn?
Is there something special you want to mention here?