From df8cf1a75bceb3411e98281585045fb0f5609939 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 14 Mar 2016 10:29:38 +0000 Subject: Boost flat_map erase on an iterator is most efficient git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1040 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1b20d31e129b9aa7f2d884aa935a53959a288650 --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 2 +- src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h | 4 ++-- 2 files changed, 3 insertions(+), 3 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 3569b323..1c4587c0 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1229,7 +1229,7 @@ class Simplex_tree { if ((child->size() > 1) || (child == root())) { // Not alone, just remove it from members // Special case when child is the root of the simplex tree, just remove it from members - child->erase(sh->first); + child->erase(sh); } else { // Sibling is emptied : must be deleted, and its parent must point on his own Sibling child->oncles()->members().at(child->parent()).assign_children(child->oncles()); diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h index 8942d92c..1eca7f6f 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h @@ -116,8 +116,8 @@ class Simplex_tree_siblings { return members_.size(); } - void erase(const Vertex_handle vh) { - members_.erase(vh); + void erase(const Dictionary_it iterator) { + members_.erase(iterator); } Simplex_tree_siblings * oncles_; -- cgit v1.2.3