diff options
author | anmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-26 14:51:34 +0000 |
---|---|---|
committer | anmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-26 14:51:34 +0000 |
commit | 67e3921f57dde28a557dc132da3ac96b9c5284f0 (patch) | |
tree | cd2acf17ae89900a8bf00cbc8aa4fb7259a35f4e | |
parent | 5cee68f83f5eb9b78bc699bf6ef9c8911e4ab2d0 (diff) |
fix
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/copy_move@762 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: a64cb1cb3661a065035c5facd23c9f9855a927c6
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 7 | ||||
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_siblings.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 51c39801..62d6f8fb 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -299,9 +299,10 @@ class Simplex_tree { { for (auto sh = sib->members().begin(), sh_copy = sib_copy->members().begin(); sh != sib->members().end(); ++sh, ++sh_copy) { if (has_children(sh_copy)) { - Siblings * newsib = new Siblings (sib, sh_copy->first); - for (auto it = sh_copy->second.children()->members().begin(); it != sh_copy->second.children()->members().end(); ++it) - newsib->members_.emplace(it->first, Node(sib, it->second.filtration())); + boost::container::flat_map<Vertex_handle, Node> copy(sh_copy->second.children()->members()); + Siblings * newsib = new Siblings (sib, sh_copy->first, copy); +// for (auto it = sh_copy->second.children()->members().begin(); it != sh_copy->second.children()->members().end(); ++it) +// newsib->members_.emplace(it->first, Node(sib, it->second.filtration())); rec_copy(newsib, sh_copy->second.children()); sh->second.assign_children(newsib); } 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 adb3f49b..d20a91d7 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 @@ -72,7 +72,7 @@ class Simplex_tree_siblings { * * 'members' must be sorted and unique.*/ template<typename RandomAccessVertexRange> - Simplex_tree_siblings(Simplex_tree_siblings * oncles, Vertex_handle parent, const& RandomAccessVertexRange members) + Simplex_tree_siblings(Simplex_tree_siblings * oncles, Vertex_handle parent, const RandomAccessVertexRange & members) : oncles_(oncles), parent_(parent), members_(boost::container::ordered_unique_range, members.begin(), |