KristofferC / NearestNeighbors.jl

High performance nearest neighbor data structures (KDTree and BallTree) and algorithms for Julia.
Other
418 stars 65 forks source link

Make KDNode smaller #166

Closed KristofferC closed 10 months ago

KristofferC commented 10 months ago

This fixes #165 removing lo and hi from KDTree. ~I don't fully like this approach because it means that querying the tree becomes thread unsafe.~

~That could maybe be fixable by making HyperRectangle be an isbitstype and not mutating it but creating new modified HyperRectangles that gets passed to the recursive searches. Hopefully that won't take too much stack space. Will have to benchmark.~

Edit: I updated the PR to fix the thread unsafeness by making HyperRectangle immutable.