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

Incremental creation of KD-TREE #139

Open
karry3775 opened this issue Dec 15, 2020 · 3 comments
Open

Incremental creation of KD-TREE #139

karry3775 opened this issue Dec 15, 2020 · 3 comments

Comments

@karry3775
Copy link

Hi,
I wanted to know if there is a way to incrementally add points to the kd-tree, like say one at a time. What I basically want to achieve is run the kd-tree generation inside a loop so that the tree expands every time it receives a new element.
Thanks!

@tommasocarella
Copy link

tommasocarella commented Feb 3, 2021

Hi @karry3775 ! Did you find any way to implement this? I was thinking of using the KDTreeSingleIndexDynamicAdaptor which presents methods for addition and removal of points. Did you find a better way?

@karry3775
Copy link
Author

karry3775 commented Mar 21, 2021 via email

@dschwen
Copy link
Contributor

dschwen commented Jan 9, 2022

KDTreeSingleIndexDynamicAdaptor seems to create a "forrest" of kd-trees. Every point set addition creates a new tree. When searching, each tree needs to be queried for a consolidated result. This will increase lookup times. Looks like depending on frequency of insertion vs. frequency of lookups, when you get to a certain number of sub-trees it might be beneficial to re-index all points as a new tree to improve lookup performance again.

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

No branches or pull requests

3 participants