From 7cd2fc5259aaa1b362652a026de1c2006ab3a78c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Jun 2017 16:55:18 +0000 Subject: Get rid of Boost_system library link git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2509 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 52deba0f2212767b99b801810d356e55417225db --- src/Contraction/example/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Contraction') diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt index b2b38dea..6443323d 100644 --- a/src/Contraction/example/CMakeLists.txt +++ b/src/Contraction/example/CMakeLists.txt @@ -5,8 +5,8 @@ project(Contraction_examples) add_executable(RipsContraction Rips_contraction.cpp) add_executable(GarlandHeckbert Garland_heckbert.cpp) -target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY}) -target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY}) +target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY}) add_test(NAME Contraction_example_tore3D_0.2 COMMAND $ -- cgit v1.2.3 From 26ccabbd6892ddc5313a7f75c98a92c268f15747 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 08:39:16 +0000 Subject: Remove boost timer and chrono dependencies git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2528 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5bfb8bd5a6e49dbea9fbfbdc1d748423fc930913 --- src/Contraction/example/CMakeLists.txt | 4 ---- src/Contraction/example/Garland_heckbert.cpp | 3 --- src/Contraction/example/Rips_contraction.cpp | 6 ------ src/Skeleton_blocker/example/CMakeLists.txt | 2 -- src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp | 4 ---- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 +- 6 files changed, 1 insertion(+), 20 deletions(-) (limited to 'src/Contraction') diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt index 6443323d..83594c0e 100644 --- a/src/Contraction/example/CMakeLists.txt +++ b/src/Contraction/example/CMakeLists.txt @@ -5,10 +5,6 @@ project(Contraction_examples) add_executable(RipsContraction Rips_contraction.cpp) add_executable(GarlandHeckbert Garland_heckbert.cpp) -target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY}) -target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY}) - - add_test(NAME Contraction_example_tore3D_0.2 COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0.2") # TODO(DS) : These tests are too long under Windows diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 8b5a6a6c..2b0dc973 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include "Garland_heckbert/Error_quadric.h" @@ -165,8 +164,6 @@ int main(int argc, char *argv[]) { int num_contractions = atoi(argv[3]); - boost::timer::auto_cpu_timer t; - // constructs the contractor object with Garland Heckbert policies. Complex_contractor contractor(complex, new GH_cost(complex), diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 8289b1d3..1b97f877 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -24,7 +24,6 @@ #include #include -#include #include struct Geometry_trait { @@ -68,8 +67,6 @@ int main(int argc, char *argv[]) { build_rips(complex, atof(argv[2])); - boost::timer::auto_cpu_timer t; - std::cout << "Initial complex has " << complex.num_vertices() << " vertices and " << complex.num_edges() << " edges" << std::endl; @@ -90,9 +87,6 @@ int main(int argc, char *argv[]) { complex.num_blockers() << " blockers and " << num_simplices << " simplices" << std::endl; - - std::cout << "Time to simplify and enumerate simplices:\n"; - return EXIT_SUCCESS; } diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt index 6d685717..de70f089 100644 --- a/src/Skeleton_blocker/example/CMakeLists.txt +++ b/src/Skeleton_blocker/example/CMakeLists.txt @@ -5,8 +5,6 @@ add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_sim add_executable(Skeleton_blocker_example_iteration Skeleton_blocker_iteration.cpp) add_executable(Skeleton_blocker_example_link Skeleton_blocker_link.cpp) -target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY}) - add_test(NAME Skeleton_blocker_example_from_simplices COMMAND $) add_test(NAME Skeleton_blocker_example_iteration COMMAND $) add_test(NAME Skeleton_blocker_example_link COMMAND $) diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 6a1bc480..4a0044e1 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -22,8 +22,6 @@ #include -#include - #include #include #include @@ -47,8 +45,6 @@ Complex build_complete_complex(int n) { } int main(int argc, char *argv[]) { - boost::timer::auto_cpu_timer t; - const int n = 15; // build a full complex with n vertices and 2^n-1 simplices diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index b4f3eb52..2be79ee4 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -1,6 +1,6 @@ # This files manage third party libraries required by GUDHI -find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework chrono timer date_time program_options thread) +find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework date_time program_options thread) if(NOT Boost_FOUND) message(FATAL_ERROR "NOTICE: This program requires Boost and will not be compiled.") -- cgit v1.2.3 From 7260c86a2158b0df3f33b49f314201dd51044563 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 12:20:12 +0000 Subject: Rewrite Contraction and Skeleton blocker time display using Gudhi::Clock git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2535 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e2b5c1e152fd7bdca9d07db0390944409942ba53 --- src/Contraction/example/Garland_heckbert.cpp | 5 +++++ src/Contraction/example/Rips_contraction.cpp | 5 +++++ src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp | 3 +++ src/common/include/gudhi/Clock.h | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/Contraction') diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 2b0dc973..f0cde95e 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -164,6 +165,8 @@ int main(int argc, char *argv[]) { int num_contractions = atoi(argv[3]); + Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices"); + // constructs the contractor object with Garland Heckbert policies. Complex_contractor contractor(complex, new GH_cost(complex), @@ -179,6 +182,8 @@ int main(int argc, char *argv[]) { complex.num_edges() << " edges and " << complex.num_triangles() << " triangles." << std::endl; + std::cout << contraction_chrono; + // write simplified complex Gudhi::skeleton_blocker::Skeleton_blocker_off_writer off_writer(argv[2], complex); diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 1b97f877..501b0e87 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -67,6 +68,8 @@ int main(int argc, char *argv[]) { build_rips(complex, atof(argv[2])); + Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices"); + std::cout << "Initial complex has " << complex.num_vertices() << " vertices and " << complex.num_edges() << " edges" << std::endl; @@ -87,6 +90,8 @@ int main(int argc, char *argv[]) { complex.num_blockers() << " blockers and " << num_simplices << " simplices" << std::endl; + std::cout << contraction_chrono; + return EXIT_SUCCESS; } diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 4a0044e1..08ff0264 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -45,6 +46,7 @@ Complex build_complete_complex(int n) { } int main(int argc, char *argv[]) { + Gudhi::Clock skbl_chrono("Time to build the complete complex, enumerate simplices and Euler Characteristic"); const int n = 15; // build a full complex with n vertices and 2^n-1 simplices @@ -78,5 +80,6 @@ int main(int argc, char *argv[]) { std::cout << "Saw " << num_vertices << " vertices, " << num_edges << " edges and " << num_simplices << " simplices" << std::endl; std::cout << "The Euler Characteristic is " << euler << std::endl; + std::cout << skbl_chrono; return EXIT_SUCCESS; } diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h index eff48e41..b83de2f5 100644 --- a/src/common/include/gudhi/Clock.h +++ b/src/common/include/gudhi/Clock.h @@ -62,7 +62,7 @@ class Clock { if (!clock.msg.empty()) stream << clock.msg << ": "; - stream << clock.num_seconds() << "s"; + stream << clock.num_seconds() << "s\n"; return stream; } -- cgit v1.2.3