From 3d2bc4414c68ccd8fa87db3c2e0a4dd474a093e8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 27 Dec 2024 12:16:04 +0000 Subject: [PATCH] set bound so that some curves ARE closer --- .../examples/Frechet_distance/Frechet_DS_3.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Frechet_distance/examples/Frechet_distance/Frechet_DS_3.cpp b/Frechet_distance/examples/Frechet_distance/Frechet_DS_3.cpp index 65e409a0200..792778c25e2 100644 --- a/Frechet_distance/examples/Frechet_distance/Frechet_DS_3.cpp +++ b/Frechet_distance/examples/Frechet_distance/Frechet_DS_3.cpp @@ -32,9 +32,13 @@ int main(int argc, char* argv[]) CGAL::FrechetDistanceNearNeighborsDS ds; ds.insert(curves); - double distance = 10; + for(const Curve& c : curves){ + std::pair res = CGAL::approximate_Frechet_distance(c, query, 0.000001); + std::cout << "The Frechet distance between the polylines is between " << res.first << " and " << res.second << std::endl; + } + double distance = 16; std::vector result = ds.get_close_curves(query, distance); - std::cout << result.size() << "curves at Frechet distance closer than " << distance << std::endl; + std::cout << result.size() << " curves at Frechet distance closer than " << distance << std::endl; return 0; }