summaryrefslogtreecommitdiff
path: root/src/Contraction/example
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-28 10:31:30 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-28 10:31:30 +0000
commitf9cbd0166b89e2129fca58bb60620d257b6b6c80 (patch)
tree06a22db096100897a45e560e0d6c020b9c0ef1f6 /src/Contraction/example
parent09925494f2d5010b05f11f418f2c10f99e2e0fdb (diff)
parent06f595c9bbe1f7fbc1d4e9dae7f5a0a384fe62c2 (diff)
Merge of branch boost_system_no_deprecated_test in order to :
- remove boost_system library dependency - repair conda package compilation issues found - Use Gudhi::Clock instead of boost::date_time library git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2565 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d68764ab186bd44f2b2253ba21ad1c0e09584455
Diffstat (limited to 'src/Contraction/example')
-rw-r--r--src/Contraction/example/CMakeLists.txt4
-rw-r--r--src/Contraction/example/Garland_heckbert.cpp6
-rw-r--r--src/Contraction/example/Rips_contraction.cpp7
3 files changed, 7 insertions, 10 deletions
diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt
index b2b38dea..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} ${Boost_SYSTEM_LIBRARY})
-target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-
-
add_test(NAME Contraction_example_tore3D_0.2 COMMAND $<TARGET_FILE:RipsContraction>
"${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..f0cde95e 100644
--- a/src/Contraction/example/Garland_heckbert.cpp
+++ b/src/Contraction/example/Garland_heckbert.cpp
@@ -29,8 +29,8 @@
#include <gudhi/Edge_contraction.h>
#include <gudhi/Skeleton_blocker.h>
#include <gudhi/Off_reader.h>
+#include <gudhi/Clock.h>
-#include <boost/timer/timer.hpp>
#include <iostream>
#include "Garland_heckbert/Error_quadric.h"
@@ -165,7 +165,7 @@ int main(int argc, char *argv[]) {
int num_contractions = atoi(argv[3]);
- boost::timer::auto_cpu_timer t;
+ Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices");
// constructs the contractor object with Garland Heckbert policies.
Complex_contractor contractor(complex,
@@ -182,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<Complex> off_writer(argv[2], complex);
diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp
index 8289b1d3..501b0e87 100644
--- a/src/Contraction/example/Rips_contraction.cpp
+++ b/src/Contraction/example/Rips_contraction.cpp
@@ -23,8 +23,8 @@
#include <gudhi/Skeleton_blocker.h>
#include <gudhi/Off_reader.h>
#include <gudhi/Point.h>
+#include <gudhi/Clock.h>
-#include <boost/timer/timer.hpp>
#include <iostream>
struct Geometry_trait {
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
build_rips(complex, atof(argv[2]));
- boost::timer::auto_cpu_timer t;
+ Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices");
std::cout << "Initial complex has " <<
complex.num_vertices() << " vertices and " <<
@@ -90,8 +90,7 @@ 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";
+ std::cout << contraction_chrono;
return EXIT_SUCCESS;
}