Data structure for the streamlining of two-dimensional points



  • The challenge is that there are many (also tens thousand) points on the plane (possibly three-dimensional later, but so far the question of the plane). There is a need to decide many times the subset - to choose for the irration of a multiplicity point that is not more than a distance L From a point (generally speaking, not many points).

    Specify the data structure to be used to keep all points out. I can't even figure out how to get out of here, which is exactly what I'm looking for.

    Working language - C+++.


  • QA Engineer

    It's possible to break the plane to squares of size L. For each square, we keep a list of the points that hit it. For a new point, we find its square and we move the contents of this and the surrounding squares. How to do so effectively in memory, for example, here: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.35.2471&rep=rep1&type=pdf




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2