From 7370c94689e85a07fcff979db3bf8f9313df82cc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 9 Dec 2024 17:03:54 +0000 Subject: [PATCH] Revive Frechet_distance_traits.h --- .../internal/Frechet_distance.h | 1 + .../include/CGAL/Frechet_distance_traits.h | 74 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 Frechet_distance/include/CGAL/Frechet_distance_traits.h diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_distance.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_distance.h index f413568e5268..c2a1a29f8f3f 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_distance.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/Frechet_distance.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/Frechet_distance/include/CGAL/Frechet_distance_traits.h b/Frechet_distance/include/CGAL/Frechet_distance_traits.h new file mode 100644 index 000000000000..92abd6faf930 --- /dev/null +++ b/Frechet_distance/include/CGAL/Frechet_distance_traits.h @@ -0,0 +1,74 @@ +// Copyright (c) 2024 Max-Planck-Institute Saarbruecken (Germany), GeometryFactory (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : André Nusser +// Marvin Künnemann +// Karl Bringmann +// Andreas Fabri +// ============================================================================= + +#ifndef CGAL_FRECHET_DISTANCE_TRAITS_H +#define CGAL_FRECHET_DISTANCE_TRAITS_H + +#include + +#include +#include + +namespace CGAL +{ + +template +class Frechet_distance_traits +{ +public: + using Dimension = Dimension_tag; + + using FT = NT; + using Point_d = std::array; + using Cartesian_const_iterator_d = typename Point_d::const_iterator; + + struct Construct_bbox_d + { + Bbox operator()(const Point_d& p) const + { + Bbox bb; + for (int i=0;i