Skip to content

refactor: improve Sparsity class with input validation and clearer logic - #6351

Merged
DenizAltunkapan merged 3 commits into
TheAlgorithms:masterfrom
alxkm:refactor/sparsity
Jul 9, 2025
Merged

refactor: improve Sparsity class with input validation and clearer logic#6351
DenizAltunkapan merged 3 commits into
TheAlgorithms:masterfrom
alxkm:refactor/sparsity

Conversation

@alxkm

@alxkm alxkm commented Jul 7, 2025

Copy link
Copy Markdown
Member
  • Added null and empty matrix checks to prevent invalid input
  • Simplified zero counting logic for readability
  • Enhanced JavaDoc for better method documentation
  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter

codecov-commenter commented Jul 7, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.61%. Comparing base (c997a32) to head (9335386).
⚠️ Report is 377 commits behind head on master.

Files with missing lines Patch % Lines
src/main/java/com/thealgorithms/misc/Sparsity.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6351      +/-   ##
============================================
- Coverage     74.61%   74.61%   -0.01%     
  Complexity     5451     5451              
============================================
  Files           682      682              
  Lines         19022    19024       +2     
  Branches       3677     3677              
============================================
  Hits          14194    14194              
- Misses         4270     4271       +1     
- Partials        558      559       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenizAltunkapan
DenizAltunkapan enabled auto-merge (squash) July 9, 2025 18:48
@DenizAltunkapan
DenizAltunkapan merged commit a6aadd5 into TheAlgorithms:master Jul 9, 2025
6 of 7 checks passed
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