From 053a5a2f77f4747d45bc781c90b44791d6131488 Mon Sep 17 00:00:00 2001 From: glisse Date: Wed, 30 Sep 2015 20:17:19 +0000 Subject: In is_before_in_filtration, access the filtration values directly without checking for null_simplex. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@811 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: cff7635e067a691764ca250067997b8b48cb6420 --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Simplex_tree/include') diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 914247b5..96565ff1 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -908,8 +908,9 @@ class Simplex_tree { : st_(st) { } bool operator()(const Simplex_handle sh1, const Simplex_handle sh2) const { - if (st_->filtration(sh1) != st_->filtration(sh2)) { - return st_->filtration(sh1) < st_->filtration(sh2); + // Not using st_->filtration(sh1) because it uselessly tests for null_simplex. + if (sh1->second.filtration() != sh2->second.filtration()) { + return sh1->second.filtration() < sh2->second.filtration(); } // is sh1 a proper subface of sh2 return st_->reverse_lexicographic_order(sh1, sh2); -- cgit v1.2.3