summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/example/Alpha_complex_from_points.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-06 11:08:33 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-06 11:08:33 +0000
commitfb22bc9ca84f5b3c55a598bf0c903a73c117e783 (patch)
treee066a8a8fa5a07e2d0faf0be096cb542295def52 /src/Alpha_complex/example/Alpha_complex_from_points.cpp
parent3d592b82f837219ee9ecd8e33120563edb4e76ab (diff)
Replace Delaunay_triangulation_off_io.h and Delaunay_triangulation_off_rw.cpp with
Points_off_io.h and CGAL_points_off_reader.cpp Adapt UT and examples for this Adapt Alpha complex for it Alpha complex is now inserting points in a faster way (after a spatial_sort). Remove Alpha complex construction from a pointer on Delaunay triangulation (no more needed). Adapt documentation to all these modifications Forbid copy/move constructor/assignment operator on Alpha complex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1098 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 08a673b66451b5cb03fbdf482d696d93b35d220f
Diffstat (limited to 'src/Alpha_complex/example/Alpha_complex_from_points.cpp')
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_points.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Alpha_complex/example/Alpha_complex_from_points.cpp b/src/Alpha_complex/example/Alpha_complex_from_points.cpp
index 815e40d7..cd17af1e 100644
--- a/src/Alpha_complex/example/Alpha_complex_from_points.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_from_points.cpp
@@ -4,13 +4,26 @@
#include <iostream>
#include <string>
#include <vector>
+#include <limits> // for numeric limits
typedef CGAL::Epick_d< CGAL::Dimension_tag<2> > Kernel;
typedef Kernel::Point_d Point;
typedef std::vector<Point> Vector_of_points;
+void usage(int nbArgs, char * const progName) {
+ std::cerr << "Error: Number of arguments (" << nbArgs << ") is not correct\n";
+ std::cerr << "Usage: " << progName << " [alpha_square_max_value]\n";
+ std::cerr << " i.e.: " << progName << " 60.0\n";
+ exit(-1); // ----- >>
+}
+
int main(int argc, char **argv) {
- double alpha_square_max_value = 60.0;
+ if ((argc != 1) && (argc != 2)) usage(argc, (argv[0] - 1));
+
+ // Delaunay complex if alpha_square_max_value is not given by the user.
+ double alpha_square_max_value = std::numeric_limits<double>::infinity();
+ if (argc == 2)
+ alpha_square_max_value = atof(argv[1]);
// ----------------------------------------------------------------------------
// Init of a list of points