rstar icon indicating copy to clipboard operation
rstar copied to clipboard

Implement nearest_neighbour_mut

Open joverwey opened this issue 2 years ago • 2 comments

The nearest_neighbour() function returns an immutable reference to and existing node. Nodes with data associated with it, like GeomWithData<[f32;3], usize>, cannot be modified inplace. Instead one has to use pop_nearest_neighbor, change the data, and then reinsert it.

An use example case for this is an rtree that keeps visitation counts for a set of positions.

joverwey avatar Feb 20 '23 19:02 joverwey