Skip to content
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

adds k-nearest neighbor search to kd-tree #199

Merged
merged 1 commit into from
Oct 10, 2021
Merged

Conversation

ylegall
Copy link
Contributor

@ylegall ylegall commented Oct 9, 2021

this commit adds support for k-nearest neighbor search in the kd-tree module

@@ -165,7 +165,6 @@ private fun <T> sqrDistance(left: T, right: T, dimensions: Int, mapper: (T, Int)
fun <T> findAllNodes(root: KDTreeNode<T>): List<KDTreeNode<T>> {
val stack = Stack<KDTreeNode<T>>()
val all = ArrayList<KDTreeNode<T>>()
stack.empty()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this line is doing nothing with the result of stack.empty()

@hamoid
Copy link
Member

hamoid commented Oct 9, 2021

Changes tested. Demo worked well.

@edwinRNDR edwinRNDR merged commit b8ee4d8 into openrndr:master Oct 10, 2021
@ylegall ylegall deleted the kdtree branch October 10, 2021 20:27
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