From cdb7989a855219dd83d85d1cce950683e97e2d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Wed, 5 Mar 2025 10:54:58 +0100 Subject: [PATCH] Check critical TODOs. --- .../include/CGAL/Frechet_distance/internal/filter.h | 2 +- .../CGAL/Frechet_distance/internal/frechet_light.h | 8 ++------ .../Frechet_distance/internal/high_level_predicates.h | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/filter.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/filter.h index f69eb4a5f3d..9459556fd71 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/filter.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/filter.h @@ -139,9 +139,9 @@ void Filter::increase(size_t& step) { step = std::ceil(1.5 * step); } template void Filter::decrease(size_t& step) { step /= 2; } -// NOTE: all calls to cert.XXX() do nothing if CERTIFY is not defined // TODO: is it better to use #ifdef CERTIFY blocks here to avoid constructing // CPosition objects? +// Also, calls to cert.XXX() seem to do unnecessary work right now template bool Filter::bichromaticFarthestDistance() diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light.h index 833b1b0a73f..58cd6d48bdf 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light.h @@ -118,7 +118,6 @@ private: Certificate cert; - // TODO re-inline these functions! template CInterval getInterval(Curve const& curve1, IndexType const& center_id, @@ -509,15 +508,13 @@ inline void FrechetLight::continueQSimpleSearch(QSimpleInterval& qsimple, } // from here on, regular mode -> IndexType = PointID - // TODO: re-inline using if_static - // otherwise we have to compute the intersection interval: // TODO: bad style: stripping down information added by getInterval CInterval temp_interval = FrechetLight::getInterval( fixed_curve, fixed, curve, cur); Interval interval = Interval(temp_interval.begin.getPoint() == cur ? temp_interval.begin.getFraction() - : 1, ///@TODO Andre : really 1. ? pure guess, should be 0. + : 1, temp_interval.end.getPoint() == cur ? temp_interval.end.getFraction() : 1); @@ -1369,8 +1366,7 @@ bool FrechetLight::isOnUpperLeft(const CPosition& pt) const return pt[0] == 0 || pt[1] == curve_pair[1]->size() - 1; } -// TODO, André: I am not sure whether this is currently fine using interval arithmetic - +// TODO by André: I am not sure whether this is currently fine using interval arithmetic, but this only affects the certificates, which are currently not active. This needs to be checked in case certificates are used in the future. template Certificate& FrechetLight::computeCertificate() { diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/high_level_predicates.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/high_level_predicates.h index 26f2ef222cd..3fc785d1e69 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/high_level_predicates.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/high_level_predicates.h @@ -47,7 +47,6 @@ inline void make_less_than_one(Interval_nt& n) // <=> lambda^2 * a + lambda * 2 b + c = 0 // <=> lambda^2 + (2 b / a) * lambda + (c / a) = 0 // <=> lambda1/2 = - (b / a) +/- sqrt((b / a)^2 - c / a) -//TODO: use optional! template std::optional fill_lambda(const Point& circle_center,