0

For my PhD work, I need to construct the Delaunay triangulation of a given point set in any (low) dimension. So far, I have been using the C++ CGAL library with data up to 4D without any noticeable problem.

However, as I used the same class CGAL::Delaunay_d as I previously used, on an 7D data set (namely UCI repository Seeds data set), it seems like something is going wrong and I don't know how to trace my problem.

The dataset is composed of 210 points and my code stops at the insertion of the 103-rd point (DT.insert() function of the class). A segmentation fault message is displayed as my program stops. It seems like the triangulation is well constructed (I checked the size of the triangulation as along with the insertion of points in the DT) until a problem occurs at this 103-rd point. At this stage of execution, the DT is composed of 63073 simplices.

I suspect an internal issue of the insert() function or the fact that I used no exact numberical types for computation.

Has anyone a clue to investigate my problem ?

Thanks in advance,

Octavio

Octavio
  • 33
  • 4
  • What kernel are you using? This is too vague... "no exact", so I will assume double. Yes, that could very well be your problem. – Marc Glisse Jun 09 '13 at 11:20
  • If you recompile your application without the parameter -DNDEBUG, the program will probably display a useful error, instead of segfault. – lrineau Jun 10 '13 at 11:45
  • @MarcGlisse: Yes, I am using the double number type. – Octavio Jun 18 '13 at 16:32
  • @lrineau: I have recompiled without the -DNDEBUG as you suggested and have been investigating a bit further. Here are some new elements. The error that occurs while running my code is the following: _terminate called after throwing an instance of 'CGAL::Assertion_exception' what(): CGAL ERROR: assertion violation! Expr: j != dim File: /usr/local/include/CGAL/Kernel_d/HyperplaneCd.h Line: 104 Explanation: HyperplaneCd::constructor: cannot use o to determine side._ I don't get this problem with UCI 4D Iris dataset. I don't understand the reported explanation message. – Octavio Jun 18 '13 at 16:44
  • @Octavio: the problem probably comes from your choice of kernel, as has suggested. Can you copy-paste the typedefs you use to instantiate the class template `CGAL::Delaunay_d`? – lrineau Jun 19 '13 at 08:38
  • @lrineau: Here are the typedefs I use in my code: `// TYPEDEFS typedef double RT; typedef CGAL::Cartesian_d Kernel; typedef Kernel::Point_d Point; typedef CGAL::Delaunay_d Delaunay_any_d;` Here is as well the part of execution which throws the error (_HyperplaneCd.h_ file): `CGAL_assertion_msg(j != dim, "HyperplaneCd::constructor: cannot use o to determine side.");` The error occurs while constructing the hyperplane passing through a facet of the (lifted) convex hull space. Precisely, parameter 'PointCd o' fails at defining the orientation of the hyperplane. – Octavio Jun 19 '13 at 14:35
  • @Octavio: You should use an exact type instead of double, for `RT`. – lrineau Jun 20 '13 at 09:10
  • @lrineau: Thank you very much for your help. I modified the code of my project according to the suggestions you subitted and the segfault error is no longer occurring. Thanks! I used the following typedefs: `typedef CGAL::Gmpq EXACT_RT;` `typedef CGAL::Cartesian_d EXACT_Kernel;` `typedef EXACT_Kernel::Point_d EXACT_Point;` `typedef EXACT_Kernel::Vector_d EXACT_Vector;` `typedef CGAL::Delaunay_d EXACT_Delaunay_any_d;` HOWEVER, another error is occurring now as the following message is displayed: _Program received signal: “EXC_BAD_ACCESS”._ Any clue ? – Octavio Jun 27 '13 at 15:42

0 Answers0