Closed knrumsey-lanl closed 1 year ago
It does not exist and it is unlikely that it will be added to this package since many optimizations and layout decisions are done based on the number of points in the initial set of points.
As written in the docs:
All trees in NearestNeighbors.jl are static which means that points can not be added or removed from an already created tree.
Do you believe it is possible, with moderate to low effort, to modify the code myself so that an insert!()
function can be written in a way that is faster than rebuilding the full tree each time?
I am building a KDTree object and using it to find the nearest neighbors for several points. Sometime later, suppose that I want to insert new points into my existing KDTree, which should be a log(n) operation. It seems that to do this, I have to just recreate a new KDTree with the appended data, which is a n*log(n) operation. It would be nice to have an
insert!(kdtree, new_point)
function. Does this functionality exist? If not, can it be added?