-1

I have a set of points. I want to calculate the Delaunay Triangulation of them using CGAL and then get the neighbors back.

Input:

p1, p2, p3, p4, ...

Output:

p1-p2, p1-p4, ....

I found answers to this problem for 2 or 3 dimensions. However I need have at least 6-8 dimensions. I can't figure it out. The proposed answers for lower dimensions use edges_iterator. This isn't implemented for d-dimensions. The documentation isn't helping me either...

update: What I have so far is this, sadly it results in a segfault after some iterations

T t(D);
t.insert(points.begin(), points.end());
for(t_iterator ei = t.finite_full_cells_begin(); ei != t.finite_full_cells_end(); ++ei) {
    for (v_iterator vi = *ei->vertices_begin(); vi != *ei->vertices_end(); ++vi) {
        std::cout << *vi << std::endl;
    }
}

update2: I ended up using scipy's triangulation instead. Much easier to use and better documented in my opinion

2 Answers2

0

Cells have links to their vertices and every edge is part of a cell, so you can iterate on the cells and derive a list of edges (with redundancy). Note that if you only need the Delaunay graph, in high dimension, it may be faster to test for each pair of points if they form a Delaunay edge using linear programming.

Marc Glisse
  • 7,550
  • 2
  • 30
  • 53
0

Here are two papers that propose linear programming techniques to compute the Delaunay graph (pairs of adjacent Voronoi cells). It is very likely that CGAL cannot compute Delaunay in more than about 6 dimensions because it computes the full triangulation (edges, triangles, tetrahedra...).

A method for examining vector quantizer structures. Agrell IEEE 1993

Efficient Computation of Voronoi Neighbors based on Polytope Search in Pattern Recognition. ICPRAM2012

Mica
  • 43
  • 1
  • 3