summaryrefslogtreecommitdiff
path: root/src/Cech_complex/example
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cech_complex/example')
-rw-r--r--src/Cech_complex/example/CMakeLists.txt2
-rw-r--r--src/Cech_complex/example/cech_complex_example_from_points.cpp12
-rw-r--r--src/Cech_complex/example/cech_complex_step_by_step.cpp28
3 files changed, 21 insertions, 21 deletions
diff --git a/src/Cech_complex/example/CMakeLists.txt b/src/Cech_complex/example/CMakeLists.txt
index ab391215..98757988 100644
--- a/src/Cech_complex/example/CMakeLists.txt
+++ b/src/Cech_complex/example/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
project(Cech_complex_examples)
add_executable ( Cech_complex_example_step_by_step cech_complex_step_by_step.cpp )
-target_link_libraries(Cech_complex_example_step_by_step ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries(Cech_complex_example_step_by_step Boost::program_options)
if (TBB_FOUND)
target_link_libraries(Cech_complex_example_step_by_step ${TBB_LIBRARIES})
endif()
diff --git a/src/Cech_complex/example/cech_complex_example_from_points.cpp b/src/Cech_complex/example/cech_complex_example_from_points.cpp
index 3cc5a4df..1a1f708c 100644
--- a/src/Cech_complex/example/cech_complex_example_from_points.cpp
+++ b/src/Cech_complex/example/cech_complex_example_from_points.cpp
@@ -37,18 +37,18 @@ int main() {
// ----------------------------------------------------------------------------
// Display information about the one skeleton Cech complex
// ----------------------------------------------------------------------------
- std::cout << "Cech complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - "
+ std::clog << "Cech complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - "
<< stree.num_vertices() << " vertices." << std::endl;
- std::cout << "Iterator on Cech complex simplices in the filtration order, with [filtration value]:" << std::endl;
+ std::clog << "Iterator on Cech complex simplices in the filtration order, with [filtration value]:" << std::endl;
for (auto f_simplex : stree.filtration_simplex_range()) {
- std::cout << " ( ";
+ std::clog << " ( ";
for (auto vertex : stree.simplex_vertex_range(f_simplex)) {
- std::cout << vertex << " ";
+ std::clog << vertex << " ";
}
- std::cout << ") -> "
+ std::clog << ") -> "
<< "[" << stree.filtration(f_simplex) << "] ";
- std::cout << std::endl;
+ std::clog << std::endl;
}
return 0;
}
diff --git a/src/Cech_complex/example/cech_complex_step_by_step.cpp b/src/Cech_complex/example/cech_complex_step_by_step.cpp
index b3d05697..f59f0293 100644
--- a/src/Cech_complex/example/cech_complex_step_by_step.cpp
+++ b/src/Cech_complex/example/cech_complex_step_by_step.cpp
@@ -51,12 +51,12 @@ class Cech_blocker {
for (auto vertex : simplex_tree_.simplex_vertex_range(sh)) {
points.push_back(point_cloud_[vertex]);
#ifdef DEBUG_TRACES
- std::cout << "#(" << vertex << ")#";
+ std::clog << "#(" << vertex << ")#";
#endif // DEBUG_TRACES
}
Filtration_value radius = Gudhi::Minimal_enclosing_ball_radius()(points);
#ifdef DEBUG_TRACES
- std::cout << "radius = " << radius << " - " << (radius > max_radius_) << std::endl;
+ std::clog << "radius = " << radius << " - " << (radius > max_radius_) << std::endl;
#endif // DEBUG_TRACES
simplex_tree_.assign_filtration(sh, radius);
return (radius > max_radius_);
@@ -96,23 +96,23 @@ int main(int argc, char* argv[]) {
// expand the graph until dimension dim_max
st.expansion_with_blockers(dim_max, Cech_blocker(st, max_radius, off_reader.get_point_cloud()));
- std::cout << "The complex contains " << st.num_simplices() << " simplices \n";
- std::cout << " and has dimension " << st.dimension() << " \n";
+ std::clog << "The complex contains " << st.num_simplices() << " simplices \n";
+ std::clog << " and has dimension " << st.dimension() << " \n";
// Sort the simplices in the order of the filtration
st.initialize_filtration();
#if DEBUG_TRACES
- std::cout << "********************************************************************\n";
- std::cout << "* The complex contains " << st.num_simplices() << " simplices - dimension=" << st.dimension() << "\n";
- std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n";
+ std::clog << "********************************************************************\n";
+ std::clog << "* The complex contains " << st.num_simplices() << " simplices - dimension=" << st.dimension() << "\n";
+ std::clog << "* Iterator on Simplices in the filtration, with [filtration value]:\n";
for (auto f_simplex : st.filtration_simplex_range()) {
- std::cout << " "
+ std::clog << " "
<< "[" << st.filtration(f_simplex) << "] ";
for (auto vertex : st.simplex_vertex_range(f_simplex)) {
- std::cout << static_cast<int>(vertex) << " ";
+ std::clog << static_cast<int>(vertex) << " ";
}
- std::cout << std::endl;
+ std::clog << std::endl;
}
#endif // DEBUG_TRACES
@@ -144,11 +144,11 @@ void program_options(int argc, char* argv[], std::string& off_file_points, Filtr
po::notify(vm);
if (vm.count("help") || !vm.count("input-file")) {
- std::cout << std::endl;
- std::cout << "Construct a Cech complex defined on a set of input points.\n \n";
+ std::clog << std::endl;
+ std::clog << "Construct a Cech complex defined on a set of input points.\n \n";
- std::cout << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl;
- std::cout << visible << std::endl;
+ std::clog << "Usage: " << argv[0] << " [options] input-file" << std::endl << std::endl;
+ std::clog << visible << std::endl;
exit(-1);
}
}