diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-09-30 20:17:19 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-09-30 20:17:19 +0000 |
commit | 053a5a2f77f4747d45bc781c90b44791d6131488 (patch) | |
tree | 6bd52d22f42d297c6b8cae9d558bbf3a4e8d815d /src/Simplex_tree/include/gudhi/Simplex_tree.h | |
parent | 41e6d3213b7d6c3d170239ae2fca24e5d19569c1 (diff) |
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
Diffstat (limited to 'src/Simplex_tree/include/gudhi/Simplex_tree.h')
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 5 |
1 files changed, 3 insertions, 2 deletions
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); |