From 555a4f62e6a19a51ac16cd0a90535c33bbade178 Mon Sep 17 00:00:00 2001 From: salinasd Date: Thu, 18 Dec 2014 14:35:02 +0000 Subject: skbl addsimplex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@383 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 418f39a0f7b1e9109976f6376516f15e1612398b --- .../include/gudhi/Skeleton_blocker_complex.h | 4 +--- .../include/gudhi/Skeleton_blocker_simplifiable_complex.h | 14 ++++---------- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'src/Skeleton_blocker/include/gudhi') diff --git a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h index 02dffc15..15425384 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_complex.h @@ -1422,9 +1422,7 @@ unsigned make_complex_from_top_faces(Complex& complex,SimplexHandleIterator begi return simplices.size(); } - - -} +} // namespace skbl } // namespace GUDHI 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 d254222d..f70e585d 100644 --- a/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h +++ b/src/Skeleton_blocker/include/gudhi/Skeleton_blocker_simplifiable_complex.h @@ -258,19 +258,13 @@ public: } /** - * @brief add the simplex plus all its cofaces - * @details in the case where sigma is a vertex, the simplex - * added has an id which is set to the number of vertices + * @brief add a maximal simplex plus all its cofaces. + * @details the simplex must have dimension greater than one (otherwise use add_vertex or add_edge). */ void add_simplex(const Simplex_handle& sigma){ assert(!this->contains(sigma)); - if (sigma.dimension()==0) - this->add_vertex(); - else - if (sigma.dimension()==1) - this->add_edge(sigma.first_vertex(),sigma.last_vertex()); - else - remove_blocker_include_in_simplex(sigma); + assert(sigma.dimension()>1); + remove_blocker_include_in_simplex(sigma); } private: -- cgit v1.2.3