R-Tree Implementation Java

前端 未结 5 1248

I was searching the last few days for a stable implementation of the R-Tree with support of unlimited dimensions (20 or so would be enough). I only found this http://sourcef

相关标签:
5条回答
  • 2021-01-04 02:48

    I'm not entirely clear on what your exact problem is, but an R-Tree or interval tree would not work well in 20 dimensions. That's not a huge number of dimensions, but it is large enough for the curse of dimensionality to begin showing up.

    To see what I mean, consider just trying to look at all of the neighbors of a box, including ones off of corners and edges. With 20 dimensions, you'll have 320 - 1 or 3,486,784,400 neighboring boxes. (You get that by realizing that along each axis a neighbor can be -1 unit, 0 unit, or +1 unit, but (0,0,0) is not a neighbor because it represents the original box.)

    I'm sorry, but you either need to accept brute force searching, or else analyze your problem better and come up with a cleverer solution.

    0 讨论(0)
  • 2021-01-04 02:59

    I have found this R*-Tree implementation in Java which seems to offer many features:

    https://github.com/davidmoten/rtree

    You might want to check it out!

    0 讨论(0)
  • 2021-01-04 03:01

    Be aware that R-Trees can degrade badly when you have discrete data. The first thing you really need to find out is an appropriate data representation, then test if your queries work on a subset of the data.

    R-Trees will only make your queries faster. If they don't work in the first place, it will not help. You should test your approach without using R-Trees first. Unless you hit a large amount of data (say, 100.000 objects), a linear scan in-memory can easily outperform an R-Tree, in particular when you need some adapter layer because it is not well-intergrated with your code.

    The obvious approach here is to just use bounding rectangles, and linearly scan over them. If they work, you can then store the MBRs in an R-Tree to get some performance improvements. But if it doesn't work with a linear scan, it won't work with an R-Tree either (it will not work faster.)

    0 讨论(0)
  • 2021-01-04 03:04

    You can use PostgreSQL’s Generalized Search Tree indexing facility.

    GiST Quick demo

    0 讨论(0)
  • 2021-01-04 03:07

    Another good implementation in Java is ELKI: https://elki-project.github.io/.

    0 讨论(0)
提交回复
热议问题