Skip to content

[math] look at node in proper order #18617

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Collaborator

@ferdymercury ferdymercury commented May 6, 2025

This Pull request:

Changes or fixes:

This solution copies the same structure from lines 590 where the if-else statements are doing something different.

See

if (point[fAxis[inode]]<fValue[inode]){
//first examine the node that contains the point
UpdateNearestNeighbors(GetLeft(inode), point, kNN, ind, dist);
UpdateNearestNeighbors(GetRight(inode), point, kNN, ind, dist);
} else {
UpdateNearestNeighbors(GetRight(inode), point, kNN, ind, dist);
UpdateNearestNeighbors(GetLeft(inode), point, kNN, ind, dist);

Fixes https://its.cern.ch/jira/browse/ROOT-10374

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@ferdymercury ferdymercury requested a review from lmoneta as a code owner May 6, 2025 10:02
Copy link

github-actions bot commented May 6, 2025

Test Results

    19 files      19 suites   4d 14h 9m 47s ⏱️
 2 731 tests  2 731 ✅ 0 💤 0 ❌
50 408 runs  50 408 ✅ 0 💤 0 ❌

Results for commit 943ba48.

@ferdymercury ferdymercury added this to the 6.38.00 milestone May 15, 2025
Copy link
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably correct, but can we have a simple test showing the problem existing before?
Also, why the condition is now from <= to < ?

@ferdymercury
Copy link
Collaborator Author

ferdymercury commented May 23, 2025

Thanks for the review

Also, why the condition is now from <= to < ?

To be consistent with the block starting at line 590.

It is probably correct, but can we have a simple test showing the problem existing before?

I think I do not know enough of this class to prepare a test, sorry :s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants