Comments (5)
It is definitely possible, just not yet implemented, I think it could be easily ported using the std::collections::binary_heap as the priority queue. I'll look at it sometime today.
from static_aabb2d_index.
Ah awesome, thanks!
from static_aabb2d_index.
Actually... I've realised that what I probably need instead is KD-tree as I'm working with point data, so I can keep the issue open but this is not urgent or anything.
from static_aabb2d_index.
Ah yeah, you can use this spatial index for point data as well (by having min_x == max_x
and min_y == max_y
for all items added) but it is a little bit less efficient in memory and comparisons (but may still be plenty fast for your use case). The algorithm used can definitely be applied to points efficiently, there is actually an issue in the flatbush library about it: mourner/flatbush#33.
In Rust it would likely be a different type for performance and Rust's static type system, I don't have a use for that now but maybe I'll add that to this library sometime in the future as well.
I committed changes to support nearest neighbor queries (commit: f2ea39f), the unit tests pass but I haven't done any benchmarking, optimizations, or manual graphical confirmation tests yet.
I also probably want to add some examples, but I did update the docs and you can look at the tests for example use.
from static_aabb2d_index.
The algorithm used can definitely be applied to points efficiently, there is actually an issue in the flatbush library about it: mourner/flatbush#33.
Ah yes, I've posted that comment above after chatting with mourner - he said the changes to represent points are a bit tricky, so for now I've looked at KD-tree implementations and stopped on https://docs.rs/kd-tree which seems promising and works well.
I committed changes to support nearest neighbor queries (commit: f2ea39f), the unit tests pass but I haven't done any benchmarking, optimizations, or manual graphical confirmation tests yet.
Awesome, thanks. I'll close this issue for now then.
from static_aabb2d_index.
Related Issues (1)
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 static_aabb2d_index.