From 4ed4d096bf4560ccdbe7fa0c8d64735c9153f617 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 16 Oct 2025 15:47:54 +0100 Subject: [PATCH 1/7] Add testcase that fails --- .../Frechet_distance/Frechet-IssueOct25.cpp | 58 ++ .../test/Frechet_distance/poly1.txt | 185 ++++++ .../test/Frechet_distance/poly2.txt | 625 ++++++++++++++++++ 3 files changed, 868 insertions(+) create mode 100644 Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp create mode 100644 Frechet_distance/test/Frechet_distance/poly1.txt create mode 100644 Frechet_distance/test/Frechet_distance/poly2.txt diff --git a/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp new file mode 100644 index 00000000000..0e9df37c01a --- /dev/null +++ b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp @@ -0,0 +1,58 @@ +#include +#include + +#include + +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +using Point = Kernel::Point_2; +using Segment = Kernel::Segment_2; + +bool load_polyline(const std::string &filename, std::vector &polyline) { + polyline.clear(); + std::ifstream ifs(filename); + + if (!ifs) + return false; + + while (ifs.good()) { + Point p; + ifs >> p; + if (ifs.good()) + polyline.push_back(p); + } + + return true; +} + +int main(int argc, char* argv[]) { + + std::vector poly1, poly2; + + //int N1 = std::atoi(argv[1]); + //int N2 = std::atoi(argv[2]); + if (!load_polyline("poly1.txt", poly1) || !load_polyline("poly2.txt", poly2)) { + std::cout << "input files could not be loaded" << std::endl; + return 0; + } + +/* + for(int i = N1; i < (int)poly1.size(); i++) { + poly1[i] = poly1[0]; + } + for(int i = N2; i < (int)poly2.size(); i++) { + poly2[i] = poly2[0]; + } + + std::ofstream ofs("poly1_mod.txt"); + for(const auto& p : poly1) { + ofs << p << std::endl; + } + std::ofstream ofs2("poly2_mod.txt"); + for(const auto& p : poly2) { + ofs2 << p << std::endl; + } +*/ + std::pair res = CGAL::bounded_error_Frechet_distance(poly1, poly2, 0.000001); + + return -1; +} diff --git a/Frechet_distance/test/Frechet_distance/poly1.txt b/Frechet_distance/test/Frechet_distance/poly1.txt new file mode 100644 index 00000000000..309937888c6 --- /dev/null +++ b/Frechet_distance/test/Frechet_distance/poly1.txt @@ -0,0 +1,185 @@ +-126 70 +-138 58 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-39 -18 +-42.6 -14 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 diff --git a/Frechet_distance/test/Frechet_distance/poly2.txt b/Frechet_distance/test/Frechet_distance/poly2.txt new file mode 100644 index 00000000000..5317263ddb9 --- /dev/null +++ b/Frechet_distance/test/Frechet_distance/poly2.txt @@ -0,0 +1,625 @@ +-126 70 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +70 -138 +61.4 -118.4 +61.4 -118 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 +-126 70 From 4d6541c3c46474d0a53a47d4ee0022dc5f0a819e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 16 Oct 2025 15:48:57 +0100 Subject: [PATCH 2/7] Add testcase that fails --- Frechet_distance/test/Frechet_distance/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Frechet_distance/test/Frechet_distance/CMakeLists.txt b/Frechet_distance/test/Frechet_distance/CMakeLists.txt index 9a489adcc6f..fdf7fc6d1a6 100644 --- a/Frechet_distance/test/Frechet_distance/CMakeLists.txt +++ b/Frechet_distance/test/Frechet_distance/CMakeLists.txt @@ -6,6 +6,9 @@ project( Frechet_distance_Tests ) find_package(CGAL REQUIRED) + +create_single_source_cgal_program( "Frechet-IssueOct25.cpp" ) + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) From 098e05e134ec73e6adceee05643fca702725af64 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 16 Oct 2025 17:41:04 +0100 Subject: [PATCH 3/7] Add debug output --- .../CGAL/Frechet_distance/internal/Frechet_light.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 46e91745821..88bc35098e7 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_light.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_light.h @@ -514,15 +514,24 @@ inline void FrechetLight::continueQSimpleSearch(QSimpleInterval& qsimple, // TODO: uncritical for correctness or speed but unelegant coding style: stripping down information added by getInterval CInterval temp_interval = FrechetLight::getInterval( fixed_curve, fixed, curve, cur); + std::cout .precision(15); + std::cout << "cur = " << cur << std::endl; + std::cout << temp_interval.begin.getPoint() << " " + << temp_interval.begin.getFraction().approx << std::endl; + std::cout << temp_interval.end.getPoint() << std::endl; + Interval interval = Interval(temp_interval.begin.getPoint() == cur ? temp_interval.begin.getFraction() : 1, temp_interval.end.getPoint() == cur ? temp_interval.end.getFraction() : 1); - + std::cout << "before is_zero(): " << interval.begin.approx << std::endl; +// ssert(!certainly(temp_interval.begin.getFraction() <= 1) + // || !certainly(temp_interval.begin.getFraction() > 1)); // do previous check for fullness again, but now it is an exact decision if (is_zero(interval.begin) && is_one(interval.end)) { // Uncertain (A) + std::cout << "after is_zero(): " << interval.begin.approx << std::endl; assert(current_free); ++cur; stepsize *= 2; From b3cb80760c1cd596514820a53a3fa875f6b92893 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sat, 18 Oct 2025 09:58:14 +0100 Subject: [PATCH 4/7] Fix --- .../CGAL/Frechet_distance/internal/Frechet_light.h | 10 +--------- .../CGAL/Frechet_distance/internal/geometry_basics.h | 12 +++++++++--- 2 files changed, 10 insertions(+), 12 deletions(-) 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 88bc35098e7..57bd1305cc5 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_light.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_light.h @@ -514,11 +514,6 @@ inline void FrechetLight::continueQSimpleSearch(QSimpleInterval& qsimple, // TODO: uncritical for correctness or speed but unelegant coding style: stripping down information added by getInterval CInterval temp_interval = FrechetLight::getInterval( fixed_curve, fixed, curve, cur); - std::cout .precision(15); - std::cout << "cur = " << cur << std::endl; - std::cout << temp_interval.begin.getPoint() << " " - << temp_interval.begin.getFraction().approx << std::endl; - std::cout << temp_interval.end.getPoint() << std::endl; Interval interval = Interval(temp_interval.begin.getPoint() == cur ? temp_interval.begin.getFraction() @@ -526,12 +521,9 @@ inline void FrechetLight::continueQSimpleSearch(QSimpleInterval& qsimple, temp_interval.end.getPoint() == cur ? temp_interval.end.getFraction() : 1); - std::cout << "before is_zero(): " << interval.begin.approx << std::endl; -// ssert(!certainly(temp_interval.begin.getFraction() <= 1) - // || !certainly(temp_interval.begin.getFraction() > 1)); + // do previous check for fullness again, but now it is an exact decision if (is_zero(interval.begin) && is_one(interval.end)) { // Uncertain (A) - std::cout << "after is_zero(): " << interval.begin.approx << std::endl; assert(current_free); ++cur; stepsize *= 2; diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h index f7cf9f72548..a8b17cb0851 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h @@ -113,7 +113,10 @@ struct Lambda> // fill_lambda returns a pair and we are only interested in a bound bool update_exact() const { - if (is_exact) { + if (is_exact){ + if (! exact){ + exact = (is_one) ? std::make_optional(Exact(1)) : std::make_optional(Exact(0)); + } return true; } @@ -198,7 +201,9 @@ struct Lambda> { if ((is_zero && other.is_zero) || (is_one && other.is_one)) return false; - if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one)) + // AF this may be wrong if approx is [0.9,1.1] and other.is_one: + // if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one)) + if(is_zero && other.is_one) return true; CGAL::Uncertain res = approx < other.approx; if (CGAL::is_certain(res)) { @@ -206,7 +211,8 @@ struct Lambda> } update_exact(); other.update_exact(); - return exact < other.exact; + bool eres = *exact < *other.exact; + return eres; } }; From 5085762946029e3257169185e8c4976f72c4322c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 20 Oct 2025 17:02:36 +0100 Subject: [PATCH 5/7] Fix return value --- Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp index 0e9df37c01a..373f317a711 100644 --- a/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp +++ b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp @@ -53,6 +53,6 @@ int main(int argc, char* argv[]) { } */ std::pair res = CGAL::bounded_error_Frechet_distance(poly1, poly2, 0.000001); - - return -1; + std::cout << "Frechet distance: [" << res.first << ", " << res.second << "]" << std::endl; + return 0; } From c5b5a54952c883aedd2d47a6f3489f7c87e19af7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 20 Oct 2025 19:31:04 +0100 Subject: [PATCH 6/7] cleanup --- .../Frechet_distance/Frechet-IssueOct25.cpp | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp index 373f317a711..ff753671a9f 100644 --- a/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp +++ b/Frechet_distance/test/Frechet_distance/Frechet-IssueOct25.cpp @@ -24,34 +24,16 @@ bool load_polyline(const std::string &filename, std::vector &polyline) { return true; } -int main(int argc, char* argv[]) { +int main() { std::vector poly1, poly2; - //int N1 = std::atoi(argv[1]); - //int N2 = std::atoi(argv[2]); if (!load_polyline("poly1.txt", poly1) || !load_polyline("poly2.txt", poly2)) { std::cout << "input files could not be loaded" << std::endl; - return 0; + return -1; } -/* - for(int i = N1; i < (int)poly1.size(); i++) { - poly1[i] = poly1[0]; - } - for(int i = N2; i < (int)poly2.size(); i++) { - poly2[i] = poly2[0]; - } - std::ofstream ofs("poly1_mod.txt"); - for(const auto& p : poly1) { - ofs << p << std::endl; - } - std::ofstream ofs2("poly2_mod.txt"); - for(const auto& p : poly2) { - ofs2 << p << std::endl; - } -*/ std::pair res = CGAL::bounded_error_Frechet_distance(poly1, poly2, 0.000001); std::cout << "Frechet distance: [" << res.first << ", " << res.second << "]" << std::endl; return 0; From adfcc7d10283cb762eba3f7c34fb62717f9fa08d Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 21 Oct 2025 18:08:22 +0200 Subject: [PATCH 7/7] more verbose --- .../include/CGAL/Frechet_distance/internal/geometry_basics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h index a8b17cb0851..8dec6273f8a 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/geometry_basics.h @@ -114,7 +114,7 @@ struct Lambda> bool update_exact() const { if (is_exact){ - if (! exact){ + if (!exact.has_value()){ exact = (is_one) ? std::make_optional(Exact(1)) : std::make_optional(Exact(0)); } return true; @@ -211,7 +211,7 @@ struct Lambda> } update_exact(); other.update_exact(); - bool eres = *exact < *other.exact; + bool eres = exact.value() < other.exact.value(); return eres; } };