-1

I am trying to implement R-Tree in C++. While implementing Range Queries, I find that I have to check for the intersection of a point (with a given range), with a multi-dimensional hyper rectangle.

Any idea how this could be done? For 2D case I know, but how to do it for N-Dimensional Case?

Rashwan L
  • 38,237
  • 7
  • 103
  • 107
hacker315
  • 1,996
  • 2
  • 13
  • 23

2 Answers2

0

You can try a morton curve treat the co-ordinates as a binary and interleave it. Then treat the number as base-4. Then search it from left to right.

Micromega
  • 12,486
  • 7
  • 35
  • 72
0

Exactly as in the 2d case.

just use a loop.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194