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

A KD-Tree (K-Dimensional Tree) #844

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bomenderick
Copy link

A K-D Tree (also known as a K-Dimensional Tree) is a binary search tree where each node contains a K-Dimensional point in space. Essentially, it is a space-partitioning data structure used to organize points in a K-Dimensional space, which facilitates the search for nearest neighbors.

In addition to the basic operations of insertion, search, and deletion, this implementation also supports nearest neighbor searches and median finding to maintain balance during insertions. Furthermore, it includes a merge method that allows the combination of two K-D Trees by gathering their points and constructing a balanced K-D Tree from them.

Read more:

https://www.geeksforgeeks.org/search-and-insertion-in-k-dimensional-tree/
https://www.geeksforgeeks.org/deletion-in-k-dimensional-tree/

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 96.18768% with 13 lines in your changes missing coverage. Please review.

Project coverage is 95.43%. Comparing base (41c76e4) to head (bf5be5c).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/data_structures/kd_tree.rs 96.18% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #844      +/-   ##
==========================================
+ Coverage   95.42%   95.43%   +0.01%     
==========================================
  Files         316      317       +1     
  Lines       22754    23095     +341     
==========================================
+ Hits        21713    22041     +328     
- Misses       1041     1054      +13     

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

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