Skip to content

Commit

Permalink
precision -> error_bound
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Dec 27, 2024
1 parent 06e6ffa commit 85c7348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Frechet_distance/doc/Frechet_distance/Frechet_distance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ distance between two polylines in the Euclidean plane is at most a given value.

\subsection subsecFrechetDistanceSecondExample Distance Computation for 3D Polylines

The following example shows how we can compute the Fréchet distance up to a given precision on two
The following example shows how we can compute the Fréchet distance up to a given error bound on two
polylines in 3-dimensional Euclidean space using `approximate_Frechet_distance()`.

\cgalExample{Frechet_distance/Frechet_distance_3.cpp}
Expand All @@ -80,7 +80,7 @@ polylines in 3-dimensional Euclidean space using `approximate_Frechet_distance()

\subsection subsecFrechetDistanceThirdExample Distance Computation for dD Polylines

The following example shows how we can compute the Fréchet distance up to a given precision on two
The following example shows how we can compute the Fréchet distance up to a given error bound on two
polylines in 4-dimensional Euclidean space using `approximate_Frechet_distance()`.

\cgalExample{Frechet_distance/Frechet_distance_d.cpp}
Expand Down
12 changes: 6 additions & 6 deletions Frechet_distance/include/CGAL/Frechet_distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@ bool is_Frechet_distance_larger(const PointRange& polyline1,

/**
* \ingroup PkgFrechetDistanceFunctions
* approximates the Fréchet distance between two polylines up to an additive error
* of `precision`.
* returns an estimate of the Fréchet distance between the two polylines that is at most `error_bound`.
* away from the actual Fréchet distance between the two polylines.
*
* \tparam Traits a model of `FrechetDistanceTraits`
* \tparam PointRange a model of the concept `RandomAccessContainer` with `Traits::Point_d` as value type.
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
*
* \param polyline1 the first polyline defined by a sequence of consecutive points
* \param polyline2 the second polyline defined by a sequence of consecutive points
* \param precision the precision of the approximation
* \param error_bound a maximum bound by which the Fréchet distance estimate is allowed to deviate from the actual Fréchet distance.
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
*
* \cgalNamedParamsBegin
Expand All @@ -161,12 +161,12 @@ bool is_Frechet_distance_larger(const PointRange& polyline1,
* \pre the polylines must not be empty
*
* @return an interval enclosing the exact result, the difference between the upper and
* the lower bound being less than `precision`.
* the lower bound being less than `error_bound`.
*/
template <class PointRange, class NamedParameters = parameters::Default_named_parameters>
std::pair<double,double> approximate_Frechet_distance(const PointRange& polyline1,
const PointRange& polyline2,
const double precision,
const double error_bound,
const NamedParameters& np = parameters::default_values())
{
constexpr bool force_filtering =
Expand All @@ -189,7 +189,7 @@ std::pair<double,double> approximate_Frechet_distance(const PointRange& polyline
auto icurve1 = Frechet_distance_::internal::toCurve<force_filtering>(polyline1, traits);
auto icurve2 = Frechet_distance_::internal::toCurve<force_filtering>(polyline2, traits);

return Frechet_distance_::internal::calcDistance(icurve1, icurve2, precision);
return Frechet_distance_::internal::calcDistance(icurve1, icurve2, error_bound);
}

} // end of namespace CGAL
Expand Down

0 comments on commit 85c7348

Please sign in to comment.