georust / rstar

R*-tree spatial index for the Rust ecosystem
https://docs.rs/rstar
Apache License 2.0
414 stars 68 forks source link

Question on Point's dimension limit #96

Closed simeonexo closed 2 years ago

simeonexo commented 2 years ago

According to https://docs.rs/rstar/latest/rstar/trait.Point.html, Point can be built from arrays/tuples of dimension up to 9. Is there any specific reason why 9 is chosen to be the upper limit?

rmanoka commented 2 years ago

Tuple impls are done via a macro, so there is typically a limit to it. Array impls where probably coded before const. generics became standardized, so it may be possible to support arbitrary, but compile-time-chosen dimensions here.

Note that, r-star as a data-structure gets quite inefficient as the dimension (of the space) increases. You may want to consider other techniques: locality-sensitive hashing, dimension-reduction, etc. for high-dimensional data.

simeonexo commented 2 years ago

Thanks for explaining. I'll try reducing the dimension and see how it runs.