summaryrefslogtreecommitdiff
path: root/src/Alpha_complex
diff options
context:
space:
mode:
Diffstat (limited to 'src/Alpha_complex')
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index 33830175..2b27a459 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -317,11 +317,11 @@ class Alpha_complex : public Simplex_tree<> {
// --------------------------------------------------------------------------------------------
// As Alpha value is an approximation, we have to make filtration non decreasing while increasing the dimension
- if (make_filtration_non_decreasing()) {
- initialize_filtration();
- }
+ bool modified_filt = make_filtration_non_decreasing();
// Remove all simplices that have a filtration value greater than max_alpha_square
- if (prune_above_filtration(max_alpha_square)) {
+ // Remark: prune_above_filtration does not require initialize_filtration to be done before.
+ modified_filt |= prune_above_filtration(max_alpha_square);
+ if (modified_filt) {
initialize_filtration();
}
// --------------------------------------------------------------------------------------------