diff options
author | anmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-20 13:55:57 +0000 |
---|---|---|
committer | anmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-20 13:55:57 +0000 |
commit | 64b0284cef1f590efdeb8e50bf09dcdb6cea7947 (patch) | |
tree | 7d65e25f6c0765fceb7cd095e12cc9587284978f /src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h | |
parent | 57fecbe5a89aa4db82ae9cd071966a4201e03463 (diff) | |
parent | e734e9d6063b83f4bb389b8073e456cbba0b7f3a (diff) |
Merge
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/copy_move@746 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: a2bb08a2952afb518a0db7b9ea01b640cab5360d
Diffstat (limited to 'src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h')
-rw-r--r-- | src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h index 86a12d90..57e1daf0 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -208,7 +208,8 @@ void Skeleton_blocker_complex<SkeletonBlockerDS>::remove_star(const Simplex_hand } /** - * @brief add a maximal simplex plus all its cofaces. + * @brief add a maximal simplex plus all its cofaces. All vertices lower than the higher vertex of + * sigma must already be present. * @details the simplex must have dimension greater than one (otherwise use add_vertex or add_edge). */ template<typename SkeletonBlockerDS> @@ -223,7 +224,7 @@ void Skeleton_blocker_complex<SkeletonBlockerDS>::add_simplex(const Simplex_hand for (auto u_it = sigma.begin(); u_it != sigma.end(); ++u_it) for (auto v_it = u_it; ++v_it != sigma.end(); /**/) { - std::cout << "add edge" << *u_it << " " << *v_it << std::endl; + // std::cout << "add edge" << *u_it << " " << *v_it << std::endl; add_edge(*u_it, *v_it); } remove_blocker_include_in_simplex(sigma); @@ -338,9 +339,11 @@ void Skeleton_blocker_complex<SkeletonBlockerDS>::contract_edge(Vertex_handle a, Vertex_handle b) { assert(this->contains_vertex(a)); assert(this->contains_vertex(b)); - assert(this->contains_edge(a, b)); - // if some blockers passes through 'ab', we remove them. + if(this->contains_edge(a, b)) + this->add_edge(a, b); + + // if some blockers passes through 'ab', we need to remove them. if (!link_condition(a, b)) delete_blockers_around_edge(a, b); |