summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2022-06-21 15:04:27 +0200
committerHind-M <hind.montassif@gmail.com>2022-06-21 15:04:27 +0200
commit3fa972970514333d4db22ec7628c5c1a4de3c6e8 (patch)
tree7da9b2c99f746bcc9a540b073c97e38175db41af
parent868369dd61fb6ef475ffa3af724907927121b6bb (diff)
-Add/modify some comments
-Some other minor changes -Change license to LGPL
-rw-r--r--src/Cech_complex/benchmark/cech_complex_benchmark.cpp20
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex.h2
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex_blocker.h2
-rw-r--r--src/common/doc/main_page.md2
4 files changed, 14 insertions, 12 deletions
diff --git a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
index 19142780..a9dc5d0d 100644
--- a/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
+++ b/src/Cech_complex/benchmark/cech_complex_benchmark.cpp
@@ -61,20 +61,22 @@ int main(int argc, char* argv[]) {
"Cech nb simplices ; Rips nb simplices;"
<< std::endl;
boost::filesystem::directory_iterator end_itr; // default construction yields past-the-end
+ // For every ".off" file in the current directory, and for 3 predefined thresholds, compare Rips and various Cech constructions
for (boost::filesystem::directory_iterator itr(boost::filesystem::current_path()); itr != end_itr; ++itr) {
if (!boost::filesystem::is_directory(itr->status())) {
if (itr->path().extension() == ".off") {
Points_off_reader off_reader(itr->path().string());
Point p0 = off_reader.get_point_cloud()[0];
-
- for (Filtration_value radius = 0.1; radius < 0.4; radius += 0.1) {
+ // Loop over the different thresholds
+ for (Filtration_value radius = 0.1; radius < 0.35; radius += 0.1) {
std::clog << itr->path().stem() << " ; ";
std::clog << radius << " ; ";
Gudhi::Clock rips_clock("Rips computation");
Rips_complex rips_complex_from_points(off_reader.get_point_cloud(), radius, Gudhi::Euclidean_distance());
Simplex_tree rips_stree;
- rips_complex_from_points.create_complex(rips_stree, p0.size() - 1);
+ int dim_max = p0.size() - 1;
+ rips_complex_from_points.create_complex(rips_stree, dim_max);
// ------------------------------------------
// Display information about the Rips complex
// ------------------------------------------
@@ -85,14 +87,14 @@ int main(int argc, char* argv[]) {
// Cech complex
// --------------
// Fast
- benchmark_cech<CGAL::Epick_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, p0.size() - 1, false);
- benchmark_cech<CGAL::Epick_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, p0.size() - 1, false);
+ benchmark_cech<CGAL::Epick_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, dim_max, false);
+ benchmark_cech<CGAL::Epick_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, dim_max, false);
// Safe
- benchmark_cech<CGAL::Epeck_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, p0.size() - 1, false);
- benchmark_cech<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, p0.size() - 1, false);
+ benchmark_cech<CGAL::Epeck_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, dim_max, false);
+ benchmark_cech<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, dim_max, false);
// Exact
- benchmark_cech<CGAL::Epeck_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, p0.size() - 1, true);
- auto cech_stree = benchmark_cech<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, p0.size() - 1, true);
+ benchmark_cech<CGAL::Epeck_d<CGAL::Dimension_tag<3>>>(itr->path().string(), radius, dim_max, true);
+ auto cech_stree = benchmark_cech<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>(itr->path().string(), radius, dim_max, true);
std::clog << cech_stree.num_simplices() << " ; ";
std::clog << rips_stree.num_simplices() << ";" << std::endl;
diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h
index 2c6d3df5..bae21d28 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex.h
@@ -30,7 +30,7 @@ namespace cech_complex {
* \ingroup cech_complex
*
* \details
- * Cech complex is a simplicial complex constructed from a proximity graph, where the set of all simplices is filtered
+ * Cech complex is a simplicial complex where the set of all simplices is filtered
* by the radius of their minimal enclosing ball and bounded by the given max_radius.
*
* \tparam Kernel CGAL kernel: either Epick_d or Epeck_d.
diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
index 087390b6..9cd49a52 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
@@ -133,7 +133,7 @@ class Cech_blocker {
radius = std::sqrt(cast_to_fv(sph.second));
sc_ptr_->assign_key(sh, cc_ptr_->get_cache().size());
- cc_ptr_->get_cache().push_back(sph);
+ cc_ptr_->get_cache().push_back(std::move(sph));
}
#ifdef DEBUG_TRACES
diff --git a/src/common/doc/main_page.md b/src/common/doc/main_page.md
index 2cb02e3f..ce903405 100644
--- a/src/common/doc/main_page.md
+++ b/src/common/doc/main_page.md
@@ -180,7 +180,7 @@
<td width="15%">
<b>Author:</b> Vincent Rouvreau<br>
<b>Introduced in:</b> GUDHI 2.2.0<br>
- <b>Copyright:</b> MIT [(GPL v3)](../../licensing/)<br>
+ <b>Copyright:</b> MIT [(LGPL v3)](../../licensing/)<br>
<b>Requires:</b> \ref cgal
</td>
</tr>