diff --git a/Frechet_distance/doc/Frechet_distance/Frechet_distance.txt b/Frechet_distance/doc/Frechet_distance/Frechet_distance.txt index c5710ade303..9d783ffaa47 100644 --- a/Frechet_distance/doc/Frechet_distance/Frechet_distance.txt +++ b/Frechet_distance/doc/Frechet_distance/Frechet_distance.txt @@ -47,7 +47,7 @@ The following example shows ... \cgalExample{Frechet_distance/Frechet_distance_2.cpp} -subsection subsecFrechetDistanceSecondExample Distance Computation for 3D Polylines +\subsection subsecFrechetDistanceSecondExample Distance Computation for 3D Polylines The following example shows ... diff --git a/Frechet_distance/examples/Frechet_distance/Frechet_distance_3.cpp b/Frechet_distance/examples/Frechet_distance/Frechet_distance_3.cpp index a84afc6a363..c0f930527ca 100644 --- a/Frechet_distance/examples/Frechet_distance/Frechet_distance_3.cpp +++ b/Frechet_distance/examples/Frechet_distance/Frechet_distance_3.cpp @@ -12,6 +12,6 @@ int main(int argc, char* argv[]) { std::vector A, B; std::pair res = CGAL::continuous_Frechet_distance(A, B, 0.000001); - std::cout << "The Frechet distance between the curves is between " << res.first << " and " << res.second << std::endl; + std::cout << "The Frechet distance between the polylines is between " << res.first << " and " << res.second << std::endl; return 0; } diff --git a/Frechet_distance/include/CGAL/Frechet_distance.h b/Frechet_distance/include/CGAL/Frechet_distance.h index 0b61601165c..1473b94ad4e 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance.h +++ b/Frechet_distance/include/CGAL/Frechet_distance.h @@ -27,27 +27,26 @@ namespace CGAL /** * \ingroup PkgFrechetDistanceFunctions - * decides if the Frechet distance between two polylines given as a range of - * points is less than a given distance. - * \param curve1 the first curve defined - * by the sequence of consecutive points along the polyline - * \param curve2 the - * second curve defined by the sequence of consecutive points along the polyline + * decides if the Frechet distance between two polylines is less than a given distance. + * + * \param polyline1 the first polyline defined by the sequence of consecutive points + * \param polyline2 the second polyline defined by the sequence of consecutive points * \param distance the decision distance * \param traits the geometric traits object + * * \tparam Traits a model of `FrechetDistanceTraits` * \tparam PointRange a model of the concept `RandomAccessContainer` * with `Traits::Point` as value type. */ template < class Traits, class PointRange> -bool continuous_Frechet_distance_less_than(const PointRange& curve1, - const PointRange& curve2, +bool continuous_Frechet_distance_less_than(const PointRange& polyline1, + const PointRange& polyline2, const double distance, const Traits& traits = Traits()) { Protect_FPU_rounding p; - auto icurve1 = Frechet_distance::internal::toCurve(curve1, traits); - auto icurve2 = Frechet_distance::internal::toCurve(curve2, traits); + auto icurve1 = Frechet_distance::internal::toCurve(polyline1, traits); + auto icurve2 = Frechet_distance::internal::toCurve(polyline2, traits); auto idistance = Frechet_distance::internal::toDistance(distance); return Frechet_distance::internal::lessThan(icurve1, icurve2, idistance, traits); @@ -55,14 +54,12 @@ bool continuous_Frechet_distance_less_than(const PointRange& curve1, /** * \ingroup PkgFrechetDistanceFunctions - * approximates the Fréchet distance between `curve1` and `curve2` up to an additive error - * of `precision` between two polylines given as a range of points. + * approximates the Fréchet distance between two polylines up to an additive error + * of `precision`. * - * \param curve1 the first curve defined by the sequence of consecutive - * points along the polyline - * \param curve2 the second curve defined by the - * sequence of consecutive points along the polyline - * \param precision + * \param polyline1 the first polyline defined by the sequence of consecutive points + * \param polyline2 the second polyline defined by the sequence of consecutive points + * \param precision the precision of the approximation * \param traits the geometric traits object * * \tparam Traits a model of `FrechetDistanceTraits` @@ -70,14 +67,14 @@ bool continuous_Frechet_distance_less_than(const PointRange& curve1, * with `Traits::Point` as value type. */ template -std::pair continuous_Frechet_distance(const PointRange& curve1, - const PointRange& curve2, +std::pair continuous_Frechet_distance(const PointRange& polyline1, + const PointRange& polyline2, const double precision, const Traits& traits = Traits()) { Protect_FPU_rounding p; - auto icurve1 = Frechet_distance::internal::toCurve(curve1, traits); - auto icurve2 = Frechet_distance::internal::toCurve(curve2, traits); + auto icurve1 = Frechet_distance::internal::toCurve(polyline1, traits); + auto icurve2 = Frechet_distance::internal::toCurve(polyline2, traits); return Frechet_distance::internal::calcDistance(icurve1, icurve2, traits, precision); }