Comments (5)
I believe this bug is fixed in master
, but the fix has not made its way into the latest release on crates.io
. Is there any chance a new release could be prepared? Given that this bug effectively breaks nearest-neighbor lookup, it seems to me that bringing a fix out ought to be prioritized.
from rstar.
Version 0.9.0 has been released and contains the fix. Thanks everyone for the contributions!
from rstar.
It seems like the Envelope
implementation for AABB
has a bug. This particular line squares the min
and max
values before comparing them. However, that can cause the actual min to be considered as the max. Moving the squaring lines below the to below the compare-and-swap operation seems to fix the test case.
@aschampion can you review what I've mentioned above and see if that makes sense. From git log, it seems like you changed the logic while optimizing the computation of min_max_dist_2 (from O(d^2) to O(d)).
from rstar.
Thanks for getting in touch @rmanoka.
I'm not sure that's right -- we care about min and max absolute value, so squaring them first will not affect which is min and which is max. And doing the comparison first as in #64 will be incorrect in cases where the max is negative.
The issue reported here may be due to the consistency issue reported in #40. I'm not at my workstation, but will rebase and update #40 tomorrow as requested and check whether it resolves this test case.
from rstar.
@aschampion Thanks for clarifying; my suggestion was indeed incorrect.
from rstar.
Related Issues (20)
- attempt to add with overflow HOT 6
- Enable merge queues and CI runs for PR
- Need to use different types for Point::Scalar and square HOT 1
- rstar with u32, u64, ... HOT 2
- Hash not implemented
- Rectangle does not implement Hash
- New release? HOT 2
- Move PointExt::new to Point HOT 4
- Documentation about bulk load HOT 5
- rstar not listed on https://georust.org/ HOT 2
- RTree panics when running locate_within_distance on an empty tree HOT 1
- Avoiding `SmallVec` in `SelectionIterator` HOT 5
- rkyv compatible ? HOT 3
- How to serialization/deserialization `RTree`?
- Initial `AABB` can cause `from_points`/others to be wrong HOT 3
- Sorting node children
- locate_in_envelope not working? HOT 1
- Bulk Load via Iterator HOT 3
- lines in 3D use case HOT 1
- Thoughts about the feasibility of adding a RTree::relocate_with_selection_function() method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rstar.