From 306fe6ed9f581fdefcbacc3fda331fa47ae8bdc4 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 19 Jan 2017 12:49:23 +0000 Subject: Strange Floating Point Exception : 8 on MacOSX since global type removal git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/distance_matrix_in_rips_module@1958 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e0afcd91aa3b8e166f2ed439a7542934ffe0b1b5 --- .../example/periodic_alpha_complex_3d_persistence.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/Persistent_cohomology') diff --git a/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp index 6c03afce..dbc42706 100644 --- a/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp @@ -39,6 +39,7 @@ #include #include #include +#include // Traits using K = CGAL::Exact_predicates_inexact_constructions_kernel; @@ -137,19 +138,8 @@ int main(int argc, char * const argv[]) { usage(argv[0]); } - int coeff_field_characteristic = 0; - int returnedScanValue = sscanf(argv[3], "%d", &coeff_field_characteristic); - if ((returnedScanValue == EOF) || (coeff_field_characteristic <= 0)) { - std::cerr << "Error: " << argv[3] << " is not correct\n"; - usage(argv[0]); - } - - Filtration_value min_persistence = 0.0; - returnedScanValue = sscanf(argv[4], "%lf", &min_persistence); - if ((returnedScanValue == EOF) || (min_persistence < -1.0)) { - std::cerr << "Error: " << argv[4] << " is not correct\n"; - usage(argv[0]); - } + int coeff_field_characteristic = atoi(argv[3]); + Filtration_value min_persistence = strtof(argv[4], nullptr); // Read points from file std::string offInputFile(argv[1]); -- cgit v1.2.3