RTree icon indicating copy to clipboard operation
RTree copied to clipboard

why does the "Remove" function need to know a_min and a_max?

Open Mathias-Fuchs opened this issue 2 years ago • 2 comments

Hello, I'm wondering why there is no RemoveId (or whatever the name) function with simple signature

void RemoveId(const DATATYPE& a_dataId);

in addition to the existing

  void Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);

It would just remove all entries with that id which is a feature that seems to be very useful because it is needed for every update. Instead, one has to know the a_min and a_max of the entry which is a little counter-intuitive because:

  • it is unclear if entries with (smaller | larger | overlapping) bounding box and the same a_dataId will also be removed or strict equality is required,
  • in any case, it relies on floating point comparisons, the necessity of which is unclear to me.

Similarly, a function to update the a_min[NUMDIMS] and a_max[NUMDIMS] of an entry without having to delete it might also be great. Is there any way to do that already? (By the way, is "entry" synonymous with "leaf"?) Thanks for answer, Mathias

Mathias-Fuchs avatar Oct 04 '22 09:10 Mathias-Fuchs

any takers?

Mathias-Fuchs avatar May 03 '23 13:05 Mathias-Fuchs

I do think there we should have signature like

void RemoveId(const DATATYPE& a_dataId);

ibreathebsb avatar Aug 09 '24 02:08 ibreathebsb