From 9ed5279c478f5d79151e7f99390da7eb23f11550 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 2 Oct 2017 15:47:32 +0000 Subject: Fix weighted_alpha_complex_3d_persistence to work with CGAL 4.11 (2 cpp and cmake compiles the correct one) Homogeneize alpha_complex_3d* codes Fix weighted_periodic_alpha_complex_3d_persistence with CGAL doc help Add grid off file with weights to test weighted_periodic_alpha_complex_3d_persistence git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2744 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ecc4f3629e75bd986ffd22ec348f0412163e4dbd --- data/points/grid_10_10_10_in_0_2.off | 127 +++++++++++++++++++++++++++++++ data/points/grid_10_10_10_in_0_2.weights | 126 ++++++++++++++++++++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 data/points/grid_10_10_10_in_0_2.off create mode 100644 data/points/grid_10_10_10_in_0_2.weights (limited to 'data') diff --git a/data/points/grid_10_10_10_in_0_2.off b/data/points/grid_10_10_10_in_0_2.off new file mode 100644 index 00000000..7618e065 --- /dev/null +++ b/data/points/grid_10_10_10_in_0_2.off @@ -0,0 +1,127 @@ +OFF +125 0 0 +0 0 0 +0 0 0.2 +0 0 0.4 +0 0 0.6 +0 0 0.8 +0 0.2 0 +0 0.2 0.2 +0 0.2 0.4 +0 0.2 0.6 +0 0.2 0.8 +0 0.4 0 +0 0.4 0.2 +0 0.4 0.4 +0 0.4 0.6 +0 0.4 0.8 +0 0.6 0 +0 0.6 0.2 +0 0.6 0.4 +0 0.6 0.6 +0 0.6 0.8 +0 0.8 0 +0 0.8 0.2 +0 0.8 0.4 +0 0.8 0.6 +0 0.8 0.8 +0.2 0 0 +0.2 0 0.2 +0.2 0 0.4 +0.2 0 0.6 +0.2 0 0.8 +0.2 0.2 0 +0.2 0.2 0.2 +0.2 0.2 0.4 +0.2 0.2 0.6 +0.2 0.2 0.8 +0.2 0.4 0 +0.2 0.4 0.2 +0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0 +0.8 0.8 0.2 +0.8 0.8 0.4 +0.8 0.8 0.6 +0.8 0.8 0.8 diff --git a/data/points/grid_10_10_10_in_0_2.weights b/data/points/grid_10_10_10_in_0_2.weights new file mode 100644 index 00000000..3672ecfd --- /dev/null +++ b/data/points/grid_10_10_10_in_0_2.weights @@ -0,0 +1,126 @@ +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 +1.0 + -- cgit v1.2.3 From 8a3c2975bab46014e9c89837ee5d39cb68473350 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 2 Oct 2017 20:12:44 +0000 Subject: Fix weighted periodic git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2746 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: bf90bfffbc00efe5f391e45ac8ece6ff6e9d57ea --- data/points/grid_10_10_10_in_0_2.weights | 251 ++++++++++----------- src/Persistent_cohomology/example/CMakeLists.txt | 7 + ...ghted_periodic_alpha_complex_3d_persistence.cpp | 4 +- 3 files changed, 134 insertions(+), 128 deletions(-) (limited to 'data') diff --git a/data/points/grid_10_10_10_in_0_2.weights b/data/points/grid_10_10_10_in_0_2.weights index 3672ecfd..fea8f879 100644 --- a/data/points/grid_10_10_10_in_0_2.weights +++ b/data/points/grid_10_10_10_in_0_2.weights @@ -1,126 +1,125 @@ -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 - +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index f6c866dc..5f711961 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -123,6 +123,13 @@ if(CGAL_FOUND) install(TARGETS weighted_periodic_alpha_complex_3d_persistence DESTINATION bin) + add_executable(test_cgal test_cgal.cpp) + target_link_libraries(test_cgal ${CGAL_LIBRARY}) + if (TBB_FOUND) + target_link_libraries(test_cgal ${TBB_LIBRARIES}) + endif(TBB_FOUND) + + # On CGAL 4.11, the weighted alpha shape 3 interface was changed - the new interface add_executable(weighted_alpha_complex_3d_persistence weighted_alpha_complex_3d_persistence.cpp) else(NOT CGAL_VERSION VERSION_LESS 4.11.0) diff --git a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp index 14f12c0e..2ecb3f24 100644 --- a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -147,12 +147,12 @@ int main(int argc, char* const argv[]) { usage(argv[0]); } - std::cout << "wp.size() : " << wp.size() << std::endl; - // Define the periodic cube P3RT3 prt(PK::Iso_cuboid_3(x_min, y_min, z_min, x_max, y_max, z_max)); + std::cout << "1 " << std::endl; // Heuristic for inserting large point sets (if pts is reasonably large) prt.insert(wp.begin(), wp.end(), true); + std::cout << "2 " << std::endl; // As prt won't be modified anymore switch to 1-sheeted cover if possible if (prt.is_triangulation_in_1_sheet()) prt.convert_to_1_sheeted_covering(); std::cout << "Periodic Delaunay computed." << std::endl; -- cgit v1.2.3 From f1e2834261bae80eb216bcd9317538e5de4375a9 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 2 Oct 2017 20:38:02 +0000 Subject: Fix weighted periodic alpa complex 3d example test git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2748 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ddf754a1f8046c7b17db89668cf8d4dd95f69dac --- data/points/grid_10_10_10_in_0_1.weights | 1000 ++++++++++++++++++++ src/Persistent_cohomology/example/CMakeLists.txt | 6 +- ...ghted_periodic_alpha_complex_3d_persistence.cpp | 2 - 3 files changed, 1005 insertions(+), 3 deletions(-) create mode 100644 data/points/grid_10_10_10_in_0_1.weights (limited to 'data') diff --git a/data/points/grid_10_10_10_in_0_1.weights b/data/points/grid_10_10_10_in_0_1.weights new file mode 100644 index 00000000..48926e09 --- /dev/null +++ b/data/points/grid_10_10_10_in_0_1.weights @@ -0,0 +1,1000 @@ +1e-6 +1e-6 +1e-6 +1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6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 +1e-6 diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index f6c866dc..be23de35 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -105,7 +105,7 @@ if(CGAL_FOUND) add_test(NAME Persistent_cohomology_example_alpha_complex COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off" "-p" "2" "-m" "0.45") add_test(NAME Persistent_cohomology_example_periodic_alpha_complex_3d COMMAND $ - "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off" "${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt" "2" "0") + "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off" "${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt" "3" "1.0") add_test(NAME Persistent_cohomology_example_custom_persistence_sort COMMAND $) install(TARGETS alpha_complex_persistence DESTINATION bin) @@ -121,6 +121,10 @@ if(CGAL_FOUND) target_link_libraries(weighted_periodic_alpha_complex_3d_persistence ${TBB_LIBRARIES}) endif(TBB_FOUND) + add_test(NAME Persistent_cohomology_example_weigted_periodic_alpha_complex_3d COMMAND $ + "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.off" "${CMAKE_SOURCE_DIR}/data/points/grid_10_10_10_in_0_1.weights" + "${CMAKE_SOURCE_DIR}/data/points/iso_cuboid_3_in_0_1.txt" "3" "1.0") + install(TARGETS weighted_periodic_alpha_complex_3d_persistence DESTINATION bin) # On CGAL 4.11, the weighted alpha shape 3 interface was changed - the new interface diff --git a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp index 2ecb3f24..ab2e29b4 100644 --- a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -149,10 +149,8 @@ int main(int argc, char* const argv[]) { // Define the periodic cube P3RT3 prt(PK::Iso_cuboid_3(x_min, y_min, z_min, x_max, y_max, z_max)); - std::cout << "1 " << std::endl; // Heuristic for inserting large point sets (if pts is reasonably large) prt.insert(wp.begin(), wp.end(), true); - std::cout << "2 " << std::endl; // As prt won't be modified anymore switch to 1-sheeted cover if possible if (prt.is_triangulation_in_1_sheet()) prt.convert_to_1_sheeted_covering(); std::cout << "Periodic Delaunay computed." << std::endl; -- cgit v1.2.3 From 63666b64129b8ca4ba95504393f863e01f76c51b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 10 Oct 2017 14:32:18 +0000 Subject: Fix tests and homogenize code git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2775 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: bdcc278981e2683a5b49f241f07704f3d5c7ca4e --- data/points/grid_10_10_10_in_0_2.off | 127 --------------------- data/points/grid_10_10_10_in_0_2.weights | 125 -------------------- .../example/alpha_complex_3d_persistence.cpp | 11 +- .../example/exact_alpha_complex_3d_persistence.cpp | 47 ++++---- .../periodic_alpha_complex_3d_persistence.cpp | 4 +- .../weighted_alpha_complex_3d_persistence.cpp | 5 +- ...ghted_periodic_alpha_complex_3d_persistence.cpp | 8 +- 7 files changed, 32 insertions(+), 295 deletions(-) delete mode 100644 data/points/grid_10_10_10_in_0_2.off delete mode 100644 data/points/grid_10_10_10_in_0_2.weights (limited to 'data') diff --git a/data/points/grid_10_10_10_in_0_2.off b/data/points/grid_10_10_10_in_0_2.off deleted file mode 100644 index 7618e065..00000000 --- a/data/points/grid_10_10_10_in_0_2.off +++ /dev/null @@ -1,127 +0,0 @@ -OFF -125 0 0 -0 0 0 -0 0 0.2 -0 0 0.4 -0 0 0.6 -0 0 0.8 -0 0.2 0 -0 0.2 0.2 -0 0.2 0.4 -0 0.2 0.6 -0 0.2 0.8 -0 0.4 0 -0 0.4 0.2 -0 0.4 0.4 -0 0.4 0.6 -0 0.4 0.8 -0 0.6 0 -0 0.6 0.2 -0 0.6 0.4 -0 0.6 0.6 -0 0.6 0.8 -0 0.8 0 -0 0.8 0.2 -0 0.8 0.4 -0 0.8 0.6 -0 0.8 0.8 -0.2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.8 -0.8 0.4 0 -0.8 0.4 0.2 -0.8 0.4 0.4 -0.8 0.4 0.6 -0.8 0.4 0.8 -0.8 0.6 0 -0.8 0.6 0.2 -0.8 0.6 0.4 -0.8 0.6 0.6 -0.8 0.6 0.8 -0.8 0.8 0 -0.8 0.8 0.2 -0.8 0.8 0.4 -0.8 0.8 0.6 -0.8 0.8 0.8 diff --git a/data/points/grid_10_10_10_in_0_2.weights b/data/points/grid_10_10_10_in_0_2.weights deleted file mode 100644 index fea8f879..00000000 --- a/data/points/grid_10_10_10_in_0_2.weights +++ /dev/null @@ -1,125 +0,0 @@ -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 -1e-6 diff --git a/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp index a0db9b42..df96fcfd 100644 --- a/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/alpha_complex_3d_persistence.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include "alpha_complex_3d_helper.h" @@ -78,7 +79,7 @@ using Persistent_cohomology = void usage(const std::string& progName) { std::cerr << "Usage: " << progName - << " path_to_file_graph coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; + << " path_to_the_OFF_file coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; exit(-1); } @@ -90,13 +91,7 @@ int main(int argc, char* const argv[]) { } int coeff_field_characteristic = atoi(argv[2]); - - Filtration_value min_persistence = 0.0; - int returnedScanValue = sscanf(argv[3], "%f", &min_persistence); - if ((returnedScanValue == EOF) || (min_persistence < -1.0)) { - std::cerr << "Error: " << argv[3] << " is not correct\n"; - usage(argv[0]); - } + Filtration_value min_persistence = strtof(argv[3], nullptr); // Read points from file std::string offInputFile(argv[1]); diff --git a/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp index 8a335075..b189e980 100644 --- a/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/exact_alpha_complex_3d_persistence.cpp @@ -4,7 +4,7 @@ * * Author(s): Vincent Rouvreau * - * Copyright (C) 2014 INRIA Saclay (France) + * Copyright (C) 2014 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,6 +39,7 @@ #include #include #include +#include #include "alpha_complex_3d_helper.h" @@ -57,32 +58,33 @@ using Point_3 = Kernel::Point_3; // filtration with alpha values needed type definition using Alpha_value_type = Alpha_shape_3::FT; using Object = CGAL::Object; -using Dispatch = CGAL::Dispatch_output_iterator< - CGAL::cpp11::tuple, - CGAL::cpp11::tuple >, - std::back_insert_iterator< std::vector > > >; +using Dispatch = + CGAL::Dispatch_output_iterator, + CGAL::cpp11::tuple >, + std::back_insert_iterator > > >; using Cell_handle = Alpha_shape_3::Cell_handle; using Facet = Alpha_shape_3::Facet; using Edge_3 = Alpha_shape_3::Edge; using Vertex_handle = Alpha_shape_3::Vertex_handle; -using Vertex_list = std::list; +using Vertex_list = std::list; // gudhi type definition using ST = Gudhi::Simplex_tree; using Filtration_value = ST::Filtration_value; using Simplex_tree_vertex = ST::Vertex_handle; -using Alpha_shape_simplex_tree_map = std::map; +using Alpha_shape_simplex_tree_map = std::map; using Alpha_shape_simplex_tree_pair = std::pair; -using Simplex_tree_vector_vertex = std::vector< Simplex_tree_vertex >; -using PCOH = Gudhi::persistent_cohomology::Persistent_cohomology< ST, Gudhi::persistent_cohomology::Field_Zp >; +using Simplex_tree_vector_vertex = std::vector; +using Persistent_cohomology = + Gudhi::persistent_cohomology::Persistent_cohomology; -void usage(char * const progName) { - std::cerr << "Usage: " << progName << - " path_to_file_graph coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; +void usage(const std::string& progName) { + std::cerr << "Usage: " << progName + << " path_to_the_OFF_file coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; exit(-1); } -int main(int argc, char * const argv[]) { +int main(int argc, char* const argv[]) { // program args management if (argc != 4) { std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; @@ -90,13 +92,7 @@ int main(int argc, char * const argv[]) { } int coeff_field_characteristic = atoi(argv[2]); - - Filtration_value min_persistence = 0.0; - int returnedScanValue = sscanf(argv[3], "%f", &min_persistence); - if ((returnedScanValue == EOF) || (min_persistence < -1.0)) { - std::cerr << "Error: " << argv[3] << " is not correct\n"; - usage(argv[0]); - } + Filtration_value min_persistence = strtof(argv[3], nullptr); // Read points from file std::string offInputFile(argv[1]); @@ -143,28 +139,28 @@ int main(int argc, char * const argv[]) { Filtration_value filtration_max = 0.0; for (auto object_iterator : the_objects) { // Retrieve Alpha shape vertex list from object - if (const Cell_handle * cell = CGAL::object_cast(&object_iterator)) { + if (const Cell_handle* cell = CGAL::object_cast(&object_iterator)) { vertex_list = from_cell(*cell); count_cells++; if (dim_max < 3) { // Cell is of dim 3 dim_max = 3; } - } else if (const Facet * facet = CGAL::object_cast(&object_iterator)) { + } else if (const Facet* facet = CGAL::object_cast(&object_iterator)) { vertex_list = from_facet(*facet); count_facets++; if (dim_max < 2) { // Facet is of dim 2 dim_max = 2; } - } else if (const Edge_3 * edge = CGAL::object_cast(&object_iterator)) { + } else if (const Edge_3* edge = CGAL::object_cast(&object_iterator)) { vertex_list = from_edge(*edge); count_edges++; if (dim_max < 1) { // Edge_3 is of dim 1 dim_max = 1; } - } else if (const Vertex_handle * vertex = CGAL::object_cast(&object_iterator)) { + } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); } @@ -213,7 +209,6 @@ int main(int argc, char * const argv[]) { std::cout << "facets \t\t" << count_facets << std::endl; std::cout << "cells \t\t" << count_cells << std::endl; - std::cout << "Information of the Simplex Tree: " << std::endl; std::cout << " Number of vertices = " << simplex_tree.num_vertices() << " "; std::cout << " Number of simplices = " << simplex_tree.num_simplices() << std::endl << std::endl; @@ -233,7 +228,7 @@ int main(int argc, char * const argv[]) { std::cout << "Simplex_tree dim: " << simplex_tree.dimension() << std::endl; // Compute the persistence diagram of the complex - PCOH pcoh(simplex_tree); + Persistent_cohomology pcoh(simplex_tree, true); // initializes the coefficient field for homology pcoh.init_coefficients(coeff_field_characteristic); 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 33efbdc7..63731a4a 100644 --- a/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/periodic_alpha_complex_3d_persistence.cpp @@ -83,8 +83,8 @@ using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -void usage(char* const progName) { - std::cerr << "Usage: " << progName << " path_to_file_graph path_to_iso_cuboid_3_file " +void usage(const std::string& progName) { + std::cerr << "Usage: " << progName << " path_to_the_OFF_file path_to_iso_cuboid_3_file " "coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; exit(-1); } diff --git a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp index 85b0ab34..96cc57e9 100644 --- a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp @@ -49,6 +49,7 @@ #include "alpha_complex_3d_helper.h" +// Alpha_shape_3 templates type definitions using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; // For CGAL < 4.11 @@ -102,8 +103,8 @@ using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -void usage(char* const progName) { - std::cerr << "Usage: " << progName << " path_to_file_graph path_to_weight_file coeff_field_characteristic[integer > " +void usage(const std::string& progName) { + std::cerr << "Usage: " << progName << " path_to_the_OFF_file path_to_weight_file coeff_field_characteristic[integer > " "0] min_persistence[float >= -1.0]\n"; exit(-1); } diff --git a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp index ab2e29b4..a4a2a9f8 100644 --- a/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_periodic_alpha_complex_3d_persistence.cpp @@ -86,8 +86,8 @@ using Simplex_tree_vector_vertex = std::vector; using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology; -void usage(char* const progName) { - std::cerr << "Usage: " << progName << " path_to_the_OFF_File path_to_weight_file path_to_the_cuboid_file " +void usage(const std::string& progName) { + std::cerr << "Usage: " << progName << " path_to_the_OFF_file path_to_weight_file path_to_the_cuboid_file " "coeff_field_characteristic[integer > 0] min_persistence[float >= -1.0]\n"; exit(-1); } @@ -96,7 +96,6 @@ int main(int argc, char* const argv[]) { // program args management if (argc != 6) { std::cerr << "Error: Number of arguments (" << argc << ") is not correct\n"; - // file with points, file with weights, cuboid file, field characteristics, minimum persistence. usage(argv[0]); } @@ -206,8 +205,7 @@ int main(int argc, char* const argv[]) { // Edge_3 is of dim 1 dim_max = 1; } - } else if (const Alpha_shape_3::Vertex_handle* vertex = - CGAL::object_cast(&object_iterator)) { + } else if (const Vertex_handle* vertex = CGAL::object_cast(&object_iterator)) { count_vertices++; vertex_list = from_vertex(*vertex); } -- cgit v1.2.3