summaryrefslogtreecommitdiff
path: root/src/Contraction
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-05-20 08:42:23 +0200
committerGard Spreemann <gspr@nonempty.org>2020-05-20 08:42:23 +0200
commit9b3079646ee3f6a494b83e864b3e10b8a93597d0 (patch)
tree63ecae8cf0d09b72907805e68f19765c7dd9694a /src/Contraction
parent81816dae256a9f3c0653b1d21443c3c32da7a974 (diff)
parent97e889f34e929f3c2306803b6c37b57926bd1245 (diff)
Merge tag 'tags/gudhi-release-3.2.0' into dfsg/latest
Diffstat (limited to 'src/Contraction')
-rw-r--r--src/Contraction/example/CMakeLists.txt1
-rw-r--r--src/Contraction/example/Garland_heckbert.cpp6
-rw-r--r--src/Contraction/example/Rips_contraction.cpp10
-rw-r--r--src/Contraction/include/gudhi/Edge_contraction.h10
4 files changed, 13 insertions, 14 deletions
diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt
index f0dc885d..c5d31aca 100644
--- a/src/Contraction/example/CMakeLists.txt
+++ b/src/Contraction/example/CMakeLists.txt
@@ -4,7 +4,6 @@ if (NOT CGAL_VERSION VERSION_LESS 4.11.0)
add_executable(RipsContraction Rips_contraction.cpp)
add_executable(GarlandHeckbert Garland_heckbert.cpp)
- target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY})
add_test(NAME Contraction_example_tore3D_0.2 COMMAND $<TARGET_FILE:RipsContraction>
"${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0.2")
diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp
index 9c0b5205..489ef5d0 100644
--- a/src/Contraction/example/Garland_heckbert.cpp
+++ b/src/Contraction/example/Garland_heckbert.cpp
@@ -147,7 +147,7 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- std::cout << "Load complex with " << complex.num_vertices() << " vertices" << std::endl;
+ std::clog << "Load complex with " << complex.num_vertices() << " vertices" << std::endl;
int num_contractions = atoi(argv[3]);
@@ -158,10 +158,10 @@ int main(int argc, char *argv[]) {
Gudhi::contraction::make_link_valid_contraction<EdgeProfile>(),
new GH_visitor(complex));
- std::cout << "Contract " << num_contractions << " edges" << std::endl;
+ std::clog << "Contract " << num_contractions << " edges" << std::endl;
contractor.contract_edges(num_contractions);
- std::cout << "Final complex has " <<
+ std::clog << "Final complex has " <<
complex.num_vertices() << " vertices, " <<
complex.num_edges() << " edges and " <<
complex.num_triangles() << " triangles." << std::endl;
diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp
index b5ce06c1..42dd0910 100644
--- a/src/Contraction/example/Rips_contraction.cpp
+++ b/src/Contraction/example/Rips_contraction.cpp
@@ -52,13 +52,13 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- std::cout << "Build the Rips complex with " << complex.num_vertices() << " vertices" << std::endl;
+ std::clog << "Build the Rips complex with " << complex.num_vertices() << " vertices" << std::endl;
build_rips(complex, atof(argv[2]));
Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices");
- std::cout << "Initial complex has " <<
+ std::clog << "Initial complex has " <<
complex.num_vertices() << " vertices and " <<
complex.num_edges() << " edges" << std::endl;
@@ -69,16 +69,16 @@ int main(int argc, char *argv[]) {
Gudhi::contraction::make_remove_popable_blockers_visitor<Profile>());
contractor.contract_edges();
- std::cout << "Counting final number of simplices \n";
+ std::clog << "Counting final number of simplices \n";
unsigned num_simplices = std::distance(complex.complex_simplex_range().begin(), complex.complex_simplex_range().end());
- std::cout << "Final complex has " <<
+ std::clog << "Final complex has " <<
complex.num_vertices() << " vertices, " <<
complex.num_edges() << " edges, " <<
complex.num_blockers() << " blockers and " <<
num_simplices << " simplices" << std::endl;
- std::cout << contraction_chrono;
+ std::clog << contraction_chrono;
return EXIT_SUCCESS;
}
diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h
index 6058d64b..6c0f4c78 100644
--- a/src/Contraction/include/gudhi/Edge_contraction.h
+++ b/src/Contraction/include/gudhi/Edge_contraction.h
@@ -164,13 +164,13 @@ int main (int argc, char *argv[])
std::cerr << "Unable to read file:"<<argv[1]<<std::endl;
return EXIT_FAILURE;
}
- std::cout << "Build the Rips complex"<<std::endl;
+ std::clog << "Build the Rips complex"<<std::endl;
build_rips(complex,atof(argv[2]));
boost::timer::auto_cpu_timer t;
- std::cout << "Initial complex has "<<
+ std::clog << "Initial complex has "<<
complex.num_vertices()<<" vertices and "<<
complex.num_edges()<<" edges"<<std::endl;
@@ -181,17 +181,17 @@ int main (int argc, char *argv[])
contraction::make_remove_popable_blockers_visitor<Profile>());
contractor.contract_edges();
- std::cout << "Counting final number of simplices \n";
+ std::clog << "Counting final number of simplices \n";
unsigned num_simplices = std::distance(complex.star_simplex_range().begin(),complex.star_simplex_range().end());
- std::cout << "Final complex has "<<
+ std::clog << "Final complex has "<<
complex.num_vertices()<<" vertices, "<<
complex.num_edges()<<" edges, "<<
complex.num_blockers()<<" blockers and "<<
num_simplices<<" simplices"<<std::endl;
- std::cout << "Time to simplify and enumerate simplices:\n";
+ std::clog << "Time to simplify and enumerate simplices:\n";
return EXIT_SUCCESS;
}