From eefb9628f71cd74127cfc9ffa4f8db0803d82ad9 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 24 Mar 2016 12:40:15 +0000 Subject: prune_above_filtration version that is no more using filtration vector. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1073 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 95dca83fa459abd902624bf2a5f631925e4cf9b0 --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Alpha_complex') 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(); } // -------------------------------------------------------------------------------------------- -- cgit v1.2.3