summaryrefslogtreecommitdiff
path: root/src/Alpha_complex
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-11-17 16:55:05 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-11-17 16:55:05 +0000
commit5bf47de6d86a0ea718937ca1dc950bfefad4f211 (patch)
treeafa5c1b6efc0d3ce3121e6349b9d7ff2b8103d10 /src/Alpha_complex
parent743306053c7ad2bad617e3e48fb95545d619cdb2 (diff)
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
Diffstat (limited to 'src/Alpha_complex')
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_points.cpp20
1 files changed, 2 insertions, 18 deletions
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 <CGAL/Epick_d.h>
#include <iostream>
-#include <string>
#include <vector>
-#include <limits> // for numeric limits
using Kernel = CGAL::Epick_d< CGAL::Dimension_tag<2> >;
using Point = Kernel::Point_d;
using Vector_of_points = std::vector<Point>;
-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<double>::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<Kernel> 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
// ----------------------------------------------------------------------------