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(-) 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