nushoin / RTree

N-dimensional RTree implementation in C++
Other
376 stars 109 forks source link

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

Open Mathias-Fuchs opened 2 years ago

Mathias-Fuchs commented 2 years ago

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:

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 commented 1 year ago

any takers?

ibreathebsb commented 3 months ago

I do think there we should have signature like

void RemoveId(const DATATYPE& a_dataId);