drop 'continuous_'

This commit is contained in:
Andreas Fabri 2024-06-19 07:01:09 +01:00
parent d717a0317b
commit 8896b77d6b
8 changed files with 14 additions and 14 deletions

View File

@ -30,9 +30,9 @@ The Fréchet distance is a metric and hence two polylines that are equal (disreg
The package provides one function to approximate the Fréchet distance and one function to decide whether the Fréchet distance is at most a given value. The package provides one function to approximate the Fréchet distance and one function to decide whether the Fréchet distance is at most a given value.
The function `continuous_Frechet_distance()` computes an approximation of the Fréchet distance between two polylines, The function `Frechet_distance()` computes an approximation of the Fréchet distance between two polylines,
up to a given approximation error. It returns an interval. up to a given approximation error. It returns an interval.
The function `continuous_Frechet_distance_less_than()` decides if the Fréchet distance The function `Frechet_distance_less_than()` decides if the Fréchet distance
between two polylines is smaller than a given bound. between two polylines is smaller than a given bound.
Both functions have as template parameter a traits class defining the dimension and the point type. Both functions have as template parameter a traits class defining the dimension and the point type.
@ -50,13 +50,13 @@ the algorithm switches to the usage of square root extensions.
\subsection subsecFrechetDistanceFirstExample Decision for 2D Polylines \subsection subsecFrechetDistanceFirstExample Decision for 2D Polylines
The following example shows how we can use `continuous_Frechet_distance_less_than()` to decide whether the Fréchet distance between two polylines in the Euclidean plane is at most a given value. The following example shows how we can use `Frechet_distance_less_than()` to decide whether the Fréchet distance between two polylines in the Euclidean plane is at most a given value.
\cgalExample{Frechet_distance/Frechet_distance_2.cpp} \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 how we can compute the Fréchet distance up to a given precision on two polylines in 3-dimensional Euclidean space using `continuous_Frechet_distance()`. The following example shows how we can compute the Fréchet distance up to a given precision on two polylines in 3-dimensional Euclidean space using `Frechet_distance()`.
\cgalExample{Frechet_distance/Frechet_distance_3.cpp} \cgalExample{Frechet_distance/Frechet_distance_3.cpp}

View File

@ -39,6 +39,6 @@ This package ....
- `CGAL::Frechet_distance_traits_d` - `CGAL::Frechet_distance_traits_d`
\cgalCRPSection{Functions} \cgalCRPSection{Functions}
- `CGAL::continuous_Frechet_distance()` - `CGAL::Frechet_distance()`
- `CGAL::continuous_Frechet_distance_less_than()` - `CGAL::Frechet_distance_less_than()`
*/ */

View File

@ -11,7 +11,7 @@ using Point = Traits::Point;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
std::vector<Point> A, B; std::vector<Point> A, B;
bool res = CGAL::continuous_Frechet_distance_less_than<Traits>(A, B, 0.001); bool res = CGAL::Frechet_distance_less_than<Traits>(A, B, 0.001);
std::cout << std::boolalpha << res << std::endl; std::cout << std::boolalpha << res << std::endl;
return 0; return 0;
} }

View File

@ -11,7 +11,7 @@ using Point = Traits::Point;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
std::vector<Point> A, B; std::vector<Point> A, B;
std::pair<double> res = CGAL::continuous_Frechet_distance<Traits>(A, B, 0.000001); std::pair<double> res = CGAL::Frechet_distance<Traits>(A, B, 0.000001);
std::cout << "The Frechet distance between the polylines 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; return 0;
} }

View File

@ -12,6 +12,6 @@ using Point = Traits::Point;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
std::vector<Point> A, B; std::vector<Point> A, B;
bool res = CGAL::continuous_Frechet_distance_less_than<Traits>(A, B, 0.001); bool res = CGAL::Frechet_distance_less_than<Traits>(A, B, 0.001);
return 0; return 0;
} }

View File

@ -39,7 +39,7 @@ namespace CGAL
* with `Traits::Point` as value type. * with `Traits::Point` as value type.
*/ */
template < class Traits, class PointRange> template < class Traits, class PointRange>
bool continuous_Frechet_distance_less_than(const PointRange& polyline1, bool Frechet_distance_less_than(const PointRange& polyline1,
const PointRange& polyline2, const PointRange& polyline2,
const double distance, const double distance,
const Traits& traits = Traits()) const Traits& traits = Traits())
@ -67,7 +67,7 @@ bool continuous_Frechet_distance_less_than(const PointRange& polyline1,
* with `Traits::Point` as value type. * with `Traits::Point` as value type.
*/ */
template <class Traits,class PointRange> template <class Traits,class PointRange>
std::pair<double,double> continuous_Frechet_distance(const PointRange& polyline1, std::pair<double,double> Frechet_distance(const PointRange& polyline1,
const PointRange& polyline2, const PointRange& polyline2,
const double precision, const double precision,
const Traits& traits = Traits()) const Traits& traits = Traits())

View File

@ -75,7 +75,7 @@ auto FrechetDistanceNearNeighborsDS<PointRange, Traits>::get_close_curves(
auto result = kd_tree.search(curve, distance); auto result = kd_tree.search(curve, distance);
auto predicate = [&](PolylineID id) { auto predicate = [&](PolylineID id) {
return ! continuous_Frechet_distance_less_than<Traits, PointRange>( return ! Frechet_distance_less_than<Traits, PointRange>(
curve, curves[id], distance); curve, curves[id], distance);
}; };
auto new_end = std::remove_if(result.begin(), result.end(), predicate); auto new_end = std::remove_if(result.begin(), result.end(), predicate);

View File

@ -168,14 +168,14 @@ void testFrechetDistance()
for (auto const& query : queries) { for (auto const& query : queries) {
/* /*
std::cout std::cout
<< CGAL::continuous_Frechet_distance<TestCurve, << CGAL::Frechet_distance<TestCurve,
TestTraits>( TestTraits>(
curves[query.id1], curves[query.id2], 0.001) curves[query.id1], curves[query.id2], 0.001)
<< std::endl; << std::endl;
*/ */
timer.start(); timer.start();
auto decision = auto decision =
CGAL::continuous_Frechet_distance_less_than<TestTraits>( CGAL::Frechet_distance_less_than<TestTraits>(
curves[query.id1], curves[query.id2], query.distance); curves[query.id1], curves[query.id2], query.distance);
timer.stop(); timer.stop();
if (decision != query.decision) { if (decision != query.decision) {