summaryrefslogtreecommitdiff
path: root/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h
diff options
context:
space:
mode:
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.h9
1 files changed, 6 insertions, 3 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..fa9741b7 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>
@@ -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);