summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2021-11-03 11:03:19 +0100
committerGitHub <noreply@github.com>2021-11-03 11:03:19 +0100
commit728acf3e9ecfba29fc9be7fba5fc88f0a7f49880 (patch)
tree8ca6d71418bd15c6f26787bdd9a4169802270b27
parent936fb035118d7f1de8290d0892237f6f4662e02d (diff)
parentc5a12380e0744eaa26b59ae043dd4fa160d9f268 (diff)
Merge pull request #529 from VincentRouvreau/moderate_alpha_complex_make_filtration_non_decreasing
make_filtration_non_decreasing no more always called
-rw-r--r--src/Alpha_complex/doc/Intro_alpha_complex.h2
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h6
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex_3d.h6
-rw-r--r--src/python/doc/alpha_complex_user.rst3
4 files changed, 13 insertions, 4 deletions
diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h
index f417ebb2..5ab23720 100644
--- a/src/Alpha_complex/doc/Intro_alpha_complex.h
+++ b/src/Alpha_complex/doc/Intro_alpha_complex.h
@@ -152,6 +152,8 @@ Table of Contents
* not quite define a proper filtration (i.e. non-decreasing with respect to inclusion).
* We fix that up by calling `SimplicialComplexForAlpha::make_filtration_non_decreasing()`.
*
+ * \note This is not the case in `exact` version, this is the reason why it is not called in this case.
+ *
* \subsubsection pruneabove Prune above given filtration value
*
* The simplex tree is pruned from the given maximum \f$ \alpha^2 \f$ value (cf.
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index b315fa99..e03bb161 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -435,8 +435,10 @@ class Alpha_complex {
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
- // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension
- complex.make_filtration_non_decreasing();
+ if (!exact)
+ // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension
+ // Only in not exact version, cf. https://github.com/GUDHI/gudhi-devel/issues/57
+ complex.make_filtration_non_decreasing();
// Remove all simplices that have a filtration value greater than max_alpha_square
complex.prune_above_filtration(max_alpha_square);
// --------------------------------------------------------------------------------------------
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h
index 4e5fc933..ccc3d852 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h
@@ -554,8 +554,10 @@ Weighted_alpha_complex_3d::Weighted_point_3 wp0(Weighted_alpha_complex_3d::Bare_
std::clog << "cells \t\t" << count_cells << std::endl;
#endif // DEBUG_TRACES
// --------------------------------------------------------------------------------------------
- // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension
- complex.make_filtration_non_decreasing();
+ if (Complexity == complexity::FAST)
+ // As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension
+ // Only in FAST version, cf. https://github.com/GUDHI/gudhi-devel/issues/57
+ complex.make_filtration_non_decreasing();
// Remove all simplices that have a filtration value greater than max_alpha_square
complex.prune_above_filtration(max_alpha_square);
// --------------------------------------------------------------------------------------------
diff --git a/src/python/doc/alpha_complex_user.rst b/src/python/doc/alpha_complex_user.rst
index 3de94bb8..96e267ef 100644
--- a/src/python/doc/alpha_complex_user.rst
+++ b/src/python/doc/alpha_complex_user.rst
@@ -165,6 +165,9 @@ respect to inclusion).
We fix that up by calling :func:`~gudhi.SimplexTree.make_filtration_non_decreasing` (cf.
`C++ version <https://gudhi.inria.fr/doc/latest/class_gudhi_1_1_simplex__tree.html>`_).
+.. note::
+ This is not the case in `exact` version, this is the reason why it is not called in this case.
+
Prune above given filtration value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^