summaryrefslogtreecommitdiff
path: root/src/Tangential_complex
diff options
context:
space:
mode:
authorcjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 18:02:15 +0000
committercjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 18:02:15 +0000
commit28b7623d0aed90abe58260861c85b20e43227216 (patch)
treec6e1f146d0dfdb10b7eecd774b6b80d3c217e945 /src/Tangential_complex
parentb1e6e79715f68498c04a88e7d2237ec478078d11 (diff)
Bug fix for degenerate cases
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/tangential_test@1873 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a292246c5e85275ec8bbf293fa0157d6693121cf
Diffstat (limited to 'src/Tangential_complex')
-rw-r--r--src/Tangential_complex/include/gudhi/Tangential_complex.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Tangential_complex/include/gudhi/Tangential_complex.h b/src/Tangential_complex/include/gudhi/Tangential_complex.h
index fc368a5d..18919362 100644
--- a/src/Tangential_complex/include/gudhi/Tangential_complex.h
+++ b/src/Tangential_complex/include/gudhi/Tangential_complex.h
@@ -1131,7 +1131,7 @@ class Tangential_complex {
Tr_vertex_handle vh = triangulation.insert_if_in_star(proj_pt, center_vertex);
// Tr_vertex_handle vh = triangulation.insert(proj_pt);
- if (vh != Tr_vertex_handle()) {
+ if (vh != Tr_vertex_handle() && vh->data() == (std::numeric_limits<std::size_t>::max())) {
#ifdef GUDHI_TC_VERY_VERBOSE
++num_inserted_points;
#endif
@@ -1293,6 +1293,8 @@ class Tangential_complex {
if (index != i)
incident_simplex.insert(index);
}
+ GUDHI_CHECK(incident_simplex.size() == cur_dim_plus_1 - 1,
+ std::logic_error("update_star: wrong size of incident simplex"));
star.push_back(incident_simplex);
}
}