summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2022-08-02 18:28:07 +0200
committerHind-M <hind.montassif@gmail.com>2022-08-02 18:28:07 +0200
commit6b28e9daa5480dadd0fa3a75d610f98e0c8a0ff5 (patch)
treea9e3e540ffc5195692fd9b7cc06e6aaf02a8025c
parent2a4f60b822b15c34058220beffd311f46f11d3b3 (diff)
Get filtration from face regardless of key value
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex_blocker.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
index 6f082494..18516e70 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
@@ -71,7 +71,6 @@ class Cech_blocker {
* \return true if the simplex radius is greater than the Cech_complex max_radius*/
bool operator()(Simplex_handle sh) {
using Point_cloud = std::vector<Point_d>;
- CGAL::NT_converter<FT, Filtration_value> cast_to_fv;
Filtration_value radius = 0;
bool is_min_enclos_ball = false;
Point_cloud points;
@@ -106,10 +105,7 @@ class Cech_blocker {
#if CGAL_VERSION_NR >= 1050000000
if(exact_) CGAL::exact(sph.second);
#endif
- if(k != sc_ptr_->null_key())
- radius = sc_ptr_->filtration(face_opposite_vertex.first);
- else
- radius = std::sqrt(cast_to_fv(sph.second));
+ radius = sc_ptr_->filtration(face_opposite_vertex.first);
#ifdef DEBUG_TRACES
std::clog << "center: " << sph.first << ", radius: " << radius << std::endl;
#endif // DEBUG_TRACES
@@ -125,6 +121,7 @@ class Cech_blocker {
#if CGAL_VERSION_NR >= 1050000000
if(exact_) CGAL::exact(sph.second);
#endif
+ CGAL::NT_converter<FT, Filtration_value> cast_to_fv;
radius = std::sqrt(cast_to_fv(sph.second));
sc_ptr_->assign_key(sh, cc_ptr_->get_cache().size());