From c1786d69f0c19768c15238189ad595f4a2e0e73a Mon Sep 17 00:00:00 2001 From: salinasd Date: Mon, 6 Jul 2015 18:54:34 +0000 Subject: skbl Marc comments git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/compil_fix@684 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b1ed33835e0bffcb1160a90a09cd583889da551e --- .../Skeleton_blocker/Skeleton_blocker_sub_complex.h | 16 +--------------- .../gudhi/Skeleton_blocker_simplifiable_complex.h | 9 ++++++--- 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'src/Skeleton_blocker') 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 friend bool - proper_face_in_union( - Skeleton_blocker_sub_complex & link, - std::vector > & 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 friend bool - // proper_faces_in_union(Skeleton_blocker_simplex & sigma, Skeleton_blocker_sub_complex & link1, Skeleton_blocker_sub_complex & link2){ - // template friend bool - // proper_faces_in_union(Skeleton_blocker_simplex & sigma, Skeleton_blocker_sub_complex & link1, Skeleton_blocker_sub_complex & link2); typedef std::map 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::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 @@ -338,9 +339,11 @@ void Skeleton_blocker_complex::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); -- cgit v1.2.3