summaryrefslogtreecommitdiff
path: root/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2022-07-06 10:55:54 +0200
committerHind-M <hind.montassif@gmail.com>2022-07-06 10:55:54 +0200
commit7b4772c00c834bcc6693b48ce0b8431461ba8a53 (patch)
tree514596324daacc61c04b7b1c0b83c1e9296993cf /src/Cech_complex/include/gudhi/Cech_complex_blocker.h
parent22dc06474f68832b2cf26c3ea64191ed9684e964 (diff)
Use reference to sph for a better readability
Diffstat (limited to 'src/Cech_complex/include/gudhi/Cech_complex_blocker.h')
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex_blocker.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
index 543f677e..c6f02857 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex_blocker.h
@@ -99,15 +99,16 @@ class Cech_blocker {
points.clear();
}
// Check if the minimal enclosing ball of current face contains the extra point/opposite vertex
- if (kernel_.squared_distance_d_object()(cc_ptr_->get_cache()[sph_key].first, cc_ptr_->get_point(face_opposite_vertex.second)) <= cc_ptr_->get_cache()[sph_key].second) {
+ Sphere const& sph = cc_ptr_->get_cache()[sph_key];
+ if (kernel_.squared_distance_d_object()(sph.first, cc_ptr_->get_point(face_opposite_vertex.second)) <= sph.second) {
#ifdef DEBUG_TRACES
- std::clog << "center: " << cc_ptr_->get_cache()[sph_key].first << ", radius: " << radius << std::endl;
+ std::clog << "center: " << sph.first << ", radius: " << radius << std::endl;
#endif // DEBUG_TRACES
is_min_enclos_ball = true;
#if CGAL_VERSION_NR >= 1050000000
- if(exact_) CGAL::exact(cc_ptr_->get_cache()[sph_key].second);
+ if(exact_) CGAL::exact(sph.second);
#endif
- radius = std::sqrt(cast_to_fv(cc_ptr_->get_cache()[sph_key].second));
+ radius = std::sqrt(cast_to_fv(sph.second));
sc_ptr_->assign_key(sh, sph_key);
break;
}