summaryrefslogtreecommitdiff
path: root/src/Skeleton_blocker
diff options
context:
space:
mode:
Diffstat (limited to 'src/Skeleton_blocker')
-rw-r--r--src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h16
-rw-r--r--src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h9
2 files changed, 7 insertions, 18 deletions
diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h
index e906df75..40e26c68 100644
--- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h
+++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker/Skeleton_blocker_sub_complex.h
@@ -75,25 +75,11 @@ class Skeleton_blocker_sub_complex : public ComplexType {
typedef typename ComplexType::Root_simplex_handle Root_simplex_handle;
protected:
- ///**
- //* @brief Returns true iff the simplex formed by all vertices contained in 'addresses_sigma_in_link'
- //* but 'vertex_to_be_ignored' is in 'link'
- //*/
- /*
- template<typename T> friend bool
- proper_face_in_union(
- Skeleton_blocker_sub_complex<T> & link,
- std::vector<boost::optional<typename T::Vertex_handle> > & addresses_sigma_in_link,
- int vertex_to_be_ignored);*/
-
+
/**
* @brief Determines whether all proper faces of simplex 'sigma' belong to 'link1' \cup 'link2'
* where 'link1' and 'link2' are subcomplexes of the same complex of type ComplexType
*/
- // template<typename T> friend bool
- // proper_faces_in_union(Skeleton_blocker_simplex<typename T::Root_vertex_handle> & sigma, Skeleton_blocker_sub_complex<T> & link1, Skeleton_blocker_sub_complex<T> & link2){
- // template<typename T> friend bool
- // proper_faces_in_union(Skeleton_blocker_simplex<typename T::Root_vertex_handle> & sigma, Skeleton_blocker_sub_complex<T> & link1, Skeleton_blocker_sub_complex<T> & link2);
typedef std::map<Root_vertex_handle, Vertex_handle> IdAddressMap;
typedef typename IdAddressMap::value_type AddressPair;
typedef typename IdAddressMap::iterator IdAddressMapIterator;
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);