Блог пользователя DonnieDarko

Автор DonnieDarko, история, 8 лет назад, По-английски

If I want to build a graph when the input is a set of points
and an edge exists if the distance between two points is less than
some value x, what is the best way to construct the graph?

  • Проголосовать: нравится
  • +15
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

In the worst case the desired graph will have edges. So you might as well check distance between each pair of points and construct said graph in .

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +42 Проголосовать: не нравится

You could conpute the Delaunay triangulation of the points and then consider only edges which correspont to adjacent faces. This works because the Euclidean MST is known to be a subgraph in this (planar) triangulation graph.