summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-15 03:18:41 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-15 03:18:41 +0000
commit3e72827aa8baf2af1efe682673ae1abd1327ab47 (patch)
tree35db7ff061cfefd7be0077af3724640239e8d3e7 /src/Simplex_tree
parent8259dcb8ae5e21d78b333dddc7bf508907808e95 (diff)
Cleanup endpoints(Simplex_handle).
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@728 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4e45582a3811d3b646ace0ae6429c6789f40df61
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index a7244c3d..b300e144 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -542,9 +542,8 @@ class Simplex_tree {
* and edge. sh must point to a 1-dimensional simplex. This is an
* optimized version of the boundary computation. */
std::pair<Simplex_handle, Simplex_handle> endpoints(Simplex_handle sh) {
- return std::pair<Simplex_handle, Simplex_handle>(
- root_.members_.find(sh->first),
- root_.members_.find(self_siblings(sh)->parent()));
+ assert(dimension(sh) == 1);
+ return { find_vertex(sh->first), find_vertex(self_siblings(sh)->parent()) };
}
/** Returns the Siblings containing a simplex.*/