What is the fastest way to find the closest point to a given point?

后端 未结 9 2138
情歌与酒
情歌与酒 2020-11-28 07:18

What is the fastest way to find closest point to the given point in data array?

For example, suppose I have an array A of 3D points (with coordinates x,

9条回答
  •  星月不相逢
    2020-11-28 07:29

    You may organize your points in an Octree. Then you only need to search a small subset.

    A Octree is a fairly simple data structure you can implement yourself (which would be a valuable learning experience), or you may find some helpful libraries to get you going.

提交回复
热议问题