Skip to content

Commit

Permalink
Rename package, remove default for epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Jun 18, 2024
1 parent ae74ef6 commit fccf0b3
Show file tree
Hide file tree
Showing 363 changed files with 155 additions and 153 deletions.
2 changes: 1 addition & 1 deletion Documentation/doc/Documentation/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
\package_listing{Straight_skeleton_2}
\package_listing{Minkowski_sum_2}
\package_listing{Polyline_simplification_2}
\package_listing{Polyline_distance}
\package_listing{Frechet_distance}
\package_listing{Visibility_2}
\package_listing{Set_movable_separability_2}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The concept `PolylineDistanceTraits` defines the requirements ...
\cgalHasModelsBegin
\cgalHasModels{CGAL::Polyline_distance_traits_2}
\cgalHasModels{CGAL::Polyline_distance_traits_3}
\cgalHasModels{CGAL::Polyline_distance_traits_d}
\cgalHasModels{CGAL::Frechet_distance_traits_2}
\cgalHasModels{CGAL::Frechet_distance_traits_3}
\cgalHasModels{CGAL::Frechet_distance_traits_d}
\cgalHasModelsEnd
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace CGAL {
/*!

\mainpage User Manual
\anchor Chapter_dD_Polyline_distance
\anchor Chapter_dD_Frechet_distance

\cgalAutoToc
\author André Nusser, Marvin Künnemann, and Karl Bringmann
Expand All @@ -19,7 +19,7 @@ Section on definitions here ...

The following example shows ...

\cgalExample{Polyline_distance/Frechet_distance_2.cpp}
\cgalExample{Frechet_distance/Frechet_distance_2.cpp}

\cgalFigureBegin{figRefId,pdist-pkg-small.png}
Here you can put the caption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
\cgalPkgSummaryBegin
\cgalPkgAuthors{André Nusser, Marvin Künnemann, and Karl Bringmann}
\cgalPkgDesc{The package provides ... }
\cgalPkgManuals{Chapter_dD_Polyline_distance,PkgPolylineDistanceRef}
\cgalPkgManuals{Chapter_dD_Frechet_distance,PkgPolylineDistanceRef}
\cgalPkgSummaryEnd

\cgalPkgShortInfoBegin
\cgalPkgSince{6.1}
\cgalPkgDependsOn{\ref PkgSpatialSearchingD}
\cgalPkgBib{cgal:kn-pd}
\cgalPkgBib{cgal:nkb-fd}
\cgalPkgLicense{\ref licensesGPL "GPL"}
\cgalPkgShortInfoEnd

Expand All @@ -35,9 +34,9 @@ This package ....
- `PolylineDistanceTraits`

\cgalCRPSection{Classes}
- `CGAL::Polyline_distance_traits_2`
- `CGAL::Polyline_distance_traits_3`
- `CGAL::Polyline_distance_traits_d`
- `CGAL::Frechet_distance_traits_2`
- `CGAL::Frechet_distance_traits_3`
- `CGAL::Frechet_distance_traits_d`

\cgalCRPSection{Functions}
- `CGAL::continuous_Frechet_distance()`
Expand Down
3 changes: 3 additions & 0 deletions Frechet_distance/doc/Frechet_distance/examples.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*!
\example Frechet_distance/Frechet_distance_2.cpp
*/
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is the CMake script for compiling a CGAL application.

cmake_minimum_required(VERSION 3.1...3.14)
project( Polyline_distance_Examples )
project( Frechet_distance_Examples )

find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core )

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <CGAL/Frechet_distance.h>
#include <CGAL/Polyline_distance_traits_2.h>
#include <CGAL/Frechet_distance_traits_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <ostream>

using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
using Traits = CGAL::Polyline_distance_traits_2<Kernel>;
using Traits = CGAL::Frechet_distance_traits_2<Kernel>;
using Point = Traits::Point;

int main(int argc, char* argv[])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <CGAL/Frechet_distance.h>
#include <CGAL/Polyline_distance_traits_d.h>
#include <CGAL/Frechet_distance_traits_d.h>
#include <CGAL/Epick_d.h>

#include <iostream>
#include <vector>

using Kernel = CGAL::Epick_d<CGAL::Dimension_tag<4>>;
using Traits = CGAL::Polyline_distance_traits_d<Kernel>;
using Traits = CGAL::Frechet_distance_traits_d<Kernel>;
using Point = Traits::Point;

int main(int argc, char* argv[])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#ifndef CGAL_FRECHET_DISTANCE_H
#define CGAL_FRECHET_DISTANCE_H

#include <CGAL/license/Polyline_distance.h>
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/basic.h>
#include <CGAL/Polyline_distance/internal/Frechet_distance.h>
#include <CGAL/Frechet_distance/internal/Frechet_distance.h>

#include <iterator>

Expand All @@ -43,7 +43,7 @@ namespace CGAL
* \param curve2 the
* second curve defined by the sequence of consecutive points along the polyline
* \param distance the decision distance
* \param traits
* \param traits the geometric traits object
* \tparam Traits a model of `PolylineDistanceTraits`
* \tparam PointRange a model of the concept `RandomAccessContainer`
* with `Traits::Point` as value type.
Expand All @@ -55,37 +55,40 @@ bool continuous_Frechet_distance_less_than(const PointRange& curve1,
const Traits& traits = Traits())
{
Protect_FPU_rounding<true> p;
auto icurve1 = Polyline_distance::internal::toCurve(curve1, traits);
auto icurve2 = Polyline_distance::internal::toCurve(curve2, traits);
auto idistance = Polyline_distance::internal::toDistance(distance);
auto icurve1 = Frechet_distance::internal::toCurve(curve1, traits);
auto icurve2 = Frechet_distance::internal::toCurve(curve2, traits);
auto idistance = Frechet_distance::internal::toDistance(distance);

return Polyline_distance::internal::lessThan(icurve1, icurve2, idistance, traits);
return Frechet_distance::internal::lessThan(icurve1, icurve2, idistance, traits);
}

/**
* \ingroup PkgPolylineDistanceFunctions
* computes the Frechet distance between two polylines given as a range of points.
* 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.
*
* \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 traits
* \param traits the geometric traits object
*
* \tparam Traits a model of `PolylineDistanceTraits`
* \tparam PointRange a model of the concept `RandomAccessContainer`
* with `Traits::Point` as value type.
*/
template <class Traits,class PointRange>
std::pair<double,double> continuous_Frechet_distance(const PointRange& curve1,
const PointRange& curve2,
const double precision = 1e-10,
const double precision,
const Traits& traits = Traits())
{
Protect_FPU_rounding<true> p;
auto icurve1 = Polyline_distance::internal::toCurve(curve1, traits);
auto icurve2 = Polyline_distance::internal::toCurve(curve2, traits);
auto icurve1 = Frechet_distance::internal::toCurve(curve1, traits);
auto icurve2 = Frechet_distance::internal::toCurve(curve2, traits);

return Polyline_distance::internal::calcDistance(icurve1, icurve2, traits, precision);
return Frechet_distance::internal::calcDistance(icurve1, icurve2, traits, precision);
}

} // end of namespace CGAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
// Andreas Fabri
// =============================================================================

#ifndef CGAL_INTERNAL_POLYLINE_DISTANCE_FRECHET_DISTANCE_H
#define CGAL_INTERNAL_POLYLINE_DISTANCE_FRECHET_DISTANCE_H
#include <CGAL/license/Polyline_distance.h>
#include <CGAL/Polyline_distance/internal/curve.h>
#include <CGAL/Polyline_distance/internal/frechet_light.h>
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
#ifndef CGAL_INTERNAL_Frechet_distance_FRECHET_DISTANCE_H
#define CGAL_INTERNAL_Frechet_distance_FRECHET_DISTANCE_H
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/Frechet_distance/internal/curve.h>
#include <CGAL/Frechet_distance/internal/frechet_light.h>
#include <CGAL/Frechet_distance/internal/geometry_basics.h>

namespace CGAL {
namespace Polyline_distance {
namespace Frechet_distance {
namespace internal {

template <class PointRange, class Traits>
Expand Down Expand Up @@ -67,7 +67,7 @@ typename Traits::distance_t calcDistance(Curve<Traits> const& curve1,
}

} // namespace internal
} // namespace Polyline_distance
} // namespace Frechet_distance
} // end of namespace CGAL

#endif // CGAL_INTERNAL_POLYLINE_DISTANCE_FRECHET_DISTANCE_H
#endif // CGAL_INTERNAL_Frechet_distance_FRECHET_DISTANCE_H
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#ifndef CGAL_INTERNAL_FRECHET_DISTANCE_NEAR_NEIGHBORS_DS_H
#define CGAL_INTERNAL_FRECHET_DISTANCE_NEAR_NEIGHBORS_DS_H
#include <CGAL/license/Polyline_distance.h>
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/Cartesian_d.h>
#include <CGAL/Dimension.h>
#include <CGAL/Kd_tree.h>
Expand All @@ -40,7 +40,7 @@
#include <vector>

namespace CGAL {
namespace Polyline_distance {
namespace Frechet_distance {
namespace internal {


Expand Down Expand Up @@ -238,7 +238,7 @@ auto FrechetKdTree<Traits>::search(Polyline const& curve, FT distance)
}

} // namespace internal
} // namespace Polyline_distance
} // namespace Frechet_distance
} // end of namespace CGAL

#endif // CGAL_INTERNAL_FRECHET_DISTANCE_NEAR_NEIGHBORS_DS_H
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
// =============================================================================

#pragma once
#include <CGAL/license/Polyline_distance.h>
#include <CGAL/Polyline_distance/internal/curve.h>
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/Frechet_distance/internal/curve.h>
#include <CGAL/Frechet_distance/internal/geometry_basics.h>

namespace CGAL {
namespace Polyline_distance {
namespace Frechet_distance {
namespace internal {

template <typename C>
Expand All @@ -37,9 +37,9 @@ class Certificate
using Curve = C;
using distance_t = typename Curve::distance_t;
using K = typename Curve::K;
using CPositions = CGAL::Polyline_distance::internal::CPositions<C>;
using CPosition = CGAL::Polyline_distance::internal::CPosition<C>;
using CPoint = CGAL::Polyline_distance::internal::CPoint<C>;
using CPositions = CGAL::Frechet_distance::internal::CPositions<C>;
using CPosition = CGAL::Frechet_distance::internal::CPosition<C>;
using CPoint = CGAL::Frechet_distance::internal::CPoint<C>;
public:
Certificate() = default;

Expand Down Expand Up @@ -96,5 +96,5 @@ class Certificate
};

} // namespace internal
} // namespace Polyline_distance
} // namespace Frechet_distance
} // namespace CGAL
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
// =============================================================================

#pragma once
#include <CGAL/license/Polyline_distance.h>
#include <CGAL/Polyline_distance/internal/id.h>
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/Frechet_distance/internal/id.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Exact_rational.h>
#include <CGAL/Interval_nt.h>
Expand All @@ -33,7 +33,7 @@
#include <vector>

namespace CGAL {
namespace Polyline_distance {
namespace Frechet_distance {
namespace internal {

double length_of_diagonal(const Bbox_2& bb)
Expand Down Expand Up @@ -298,5 +298,5 @@ std::ostream& operator<<(std::ostream& out, const Curve<K>& curve)
}

} // namespace internal
} // namespace Polyline_distance
} // namespace Frechet_distance
} // namespace CGAL
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
// =============================================================================

#pragma once
#include <CGAL/license/Polyline_distance.h>
#include <CGAL/Polyline_distance/internal/certificate.h>
#include <CGAL/Polyline_distance/internal/curve.h>
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
#include <CGAL/license/Frechet_distance.h>
#include <CGAL/Frechet_distance/internal/certificate.h>
#include <CGAL/Frechet_distance/internal/curve.h>
#include <CGAL/Frechet_distance/internal/geometry_basics.h>

namespace CGAL {
namespace Polyline_distance {
namespace Frechet_distance {
namespace internal {

// TODO: we can use Cartesian_converter here when we have one-sided approximate
Expand All @@ -46,9 +46,9 @@ class Filter
using distance_t = typename K::distance_t;
using PointID = typename K::PointID;
using Point = typename K::Point;
using Certificate = CGAL::Polyline_distance::internal::Certificate<K>;
using Certificate = CGAL::Frechet_distance::internal::Certificate<K>;
using Curve = K;
using CPoint = CGAL::Polyline_distance::internal::CPoint<K>;
using CPoint = CGAL::Frechet_distance::internal::CPoint<K>;

Certificate cert;
const Curve *curve1_pt, *curve2_pt;
Expand Down Expand Up @@ -499,5 +499,5 @@ bool Filter<K>::negative(PointID position1, PointID position2)
}

} // namespace internal
} // namespace Polyline_distance
} // namespace Frechet_distance
} // namespace CGAL
Loading

0 comments on commit fccf0b3

Please sign in to comment.