Skip to content

in cover_tree.rs i64::MIN - 1 causes overflow. FIXED.#361

Merged
Mec-iS merged 3 commits intosmartcorelib:developmentfrom
skywardfire1:bugfix/knn_cover_tree
Mar 19, 2026
Merged

in cover_tree.rs i64::MIN - 1 causes overflow. FIXED.#361
Mec-iS merged 3 commits intosmartcorelib:developmentfrom
skywardfire1:bugfix/knn_cover_tree

Conversation

@skywardfire1
Copy link
Contributor

Checklist

  • [ yes ] My branch is up-to-date with development branch.
  • [ yes ] Everything works and tested on latest stable Rust.
  • [ yes ] Coverage and Linting have been applied

Im about to implement predict_proba for kNN. Extensive tests show a bug in cover_tree.rs.

When d = 0 an attempt to do i64::MIN - 1 is performed.

So this PR is a fix of it.

@skywardfire1 skywardfire1 requested a review from Mec-iS as a code owner March 19, 2026 11:20
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 44.33%. Comparing base (70d8a0f) to head (8ead30c).
⚠️ Report is 11 commits behind head on development.

Files with missing lines Patch % Lines
src/algorithm/neighbour/cover_tree.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #361      +/-   ##
===============================================
- Coverage        45.59%   44.33%   -1.27%     
===============================================
  Files               93       95       +2     
  Lines             8034     7999      -35     
===============================================
- Hits              3663     3546     -117     
- Misses            4371     4453      +82     

☔ 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.

Mec-iS
Mec-iS previously approved these changes Mar 19, 2026
@Mec-iS
Copy link
Collaborator

Mec-iS commented Mar 19, 2026

thanks. I don't understand why format check fails, please run check --all

@Mec-iS Mec-iS merged commit 8f5769f into smartcorelib:development Mar 19, 2026
11 of 13 checks passed
@skywardfire1 skywardfire1 deleted the bugfix/knn_cover_tree branch March 19, 2026 14:18
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.

2 participants