From 5bf47de6d86a0ea718937ca1dc950bfefad4f211 Mon Sep 17 00:00:00 2001 From: glisse Date: Sat, 17 Nov 2018 16:55:05 +0000 Subject: Simplify example. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/AC-glisse@3999 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ec94f4c900994fea36d76663a352bf9a5cf232c9 --- .../example/Alpha_complex_from_points.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/Alpha_complex') diff --git a/src/Alpha_complex/example/Alpha_complex_from_points.cpp b/src/Alpha_complex/example/Alpha_complex_from_points.cpp index c19f7cc8..981aa470 100644 --- a/src/Alpha_complex/example/Alpha_complex_from_points.cpp +++ b/src/Alpha_complex/example/Alpha_complex_from_points.cpp @@ -5,29 +5,13 @@ #include #include -#include #include -#include // for numeric limits using Kernel = CGAL::Epick_d< CGAL::Dimension_tag<2> >; using Point = Kernel::Point_d; using Vector_of_points = std::vector; -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) { - 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::infinity()}; - if (argc == 2) - alpha_square_max_value = atof(argv[1]); - +int main() { // ---------------------------------------------------------------------------- // Init of a list of points // ---------------------------------------------------------------------------- @@ -46,7 +30,7 @@ int main(int argc, char **argv) { Gudhi::alpha_complex::Alpha_complex alpha_complex_from_points(points); Gudhi::Simplex_tree<> simplex; - if (alpha_complex_from_points.create_complex(simplex, alpha_square_max_value)) { + if (alpha_complex_from_points.create_complex(simplex)) { // ---------------------------------------------------------------------------- // Display information about the alpha complex // ---------------------------------------------------------------------------- -- cgit v1.2.3