You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can determine whether it was added or not via the result of Add. Add returns True if it was added and False it it wasn't.
That said, I hear what you're saying. Returning a boolean to indicate success it not my preferred style and generally I would raise an exception. If I were redesigning it today I would simply allow for duplicates - I don't see why there couldn't be multiple nodes at the same coordinate, hence why I added issue #4. I will update #4 with how I was thinking of handling it. Feel free to share your opinion.
KdTree seems to always be ignoring the new values if there's an old value stored with the same key. Here's an example:
It would be better to either replace the existing value or throw an exception. I think that the library should never silently ignore the user value.
Maybe the problem will be solved as part of #4.
The text was updated successfully, but these errors were encountered: