mirror of https://github.com/CGAL/cgal
User Manual, rename tags, add example
This commit is contained in:
parent
e301f37428
commit
c50619822a
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
\ingroup PkgPolylineDistanceConcepts
|
||||
\ingroup PkgFrechetDistanceConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `FrechetDistanceTraits` defines the requirements ...
|
||||
|
|
|
|||
|
|
@ -5,32 +5,61 @@ namespace CGAL {
|
|||
\anchor Chapter_dD_Frechet_distance
|
||||
|
||||
\cgalAutoToc
|
||||
\author André Nusser, Marvin Künnemann, and Karl Bringmann
|
||||
\authors André Nusser, Marvin Künnemann, and Karl Bringmann
|
||||
|
||||
This chapter describes the ...
|
||||
|
||||
\section secPolylineDistanceDefinitions Definitions
|
||||
<center>
|
||||
<img src="FrechetTeaser.jpg" style="max-width:70%;"/>
|
||||
</center>
|
||||
|
||||
Section on definitions here ...
|
||||
This chapter provides functions for computing the Fréchet distance of polylines in any dimension under Euclidean metric.
|
||||
|
||||
\section secPolylineDistanceExamples Examples
|
||||
\section secFrechetDistanceIntroduction Introdution
|
||||
|
||||
\subsection subsecPolylineDistanceFirstExample First Example
|
||||
|
||||
The following example shows ...
|
||||
|
||||
\cgalExample{Frechet_distance/Frechet_distance_2.cpp}
|
||||
The Fréchet distance .....
|
||||
|
||||
\cgalFigureBegin{figRefId,pdist-pkg-small.png}
|
||||
Here you can put the caption
|
||||
\cgalFigureEnd
|
||||
|
||||
\section secFrechetDistanceAPI API
|
||||
|
||||
\subsection subsecPolylineDistanceImplementation Implementation History
|
||||
The function `continuous_Frechet_distance()` computes an approximation of the Fréchet distance between two polylines,
|
||||
up to a given approximation error. It returns an interval.
|
||||
The function `continuous_Frechet_distance_less_than()` decides if the Fréchet distance
|
||||
between two polylines is smaller than a given bound.
|
||||
|
||||
An intial version using floating point arithmetic was developed by the authors.
|
||||
André Nusser, together with Sebastien Loriot and Andreas Fabri introduced
|
||||
interval arithmetic and square root extensions to achieve a certified result.
|
||||
Both functions have as template parameter a traits class defining the dimension and the point type.
|
||||
The traits classes have as template parameter a kernel. This may be a kernel such as `Simple_cartesian`
|
||||
with a floating point number type, or a filtered kernel. In both cases the result is guaranteed to be correct.
|
||||
|
||||
|
||||
\section secFrechetDistanceImplementation Implementation
|
||||
|
||||
Internally all computations are done using interval arithmetic. In case of filter failures
|
||||
the algorithm switches to the usage of square root extensions.
|
||||
|
||||
\section secFrechetDistanceExamples Examples
|
||||
|
||||
\subsection subsecFrechetDistanceFirstExample Decision for 2D Polylines
|
||||
|
||||
The following example shows ...
|
||||
|
||||
\cgalExample{Frechet_distance/Frechet_distance_2.cpp}
|
||||
|
||||
subsection subsecFrechetDistanceSecondExample Distance Computation for 3D Polylines
|
||||
|
||||
The following example shows ...
|
||||
|
||||
\cgalExample{Frechet_distance/Frechet_distance_3.cpp}
|
||||
|
||||
|
||||
\subsection subsecFrechetDistanceImplementation Implementation History
|
||||
|
||||
An intial version using floating point arithmetic was developed by the authors
|
||||
while working at the Max-Planck Institute of Computer Science in Saarbrücken.
|
||||
André Nusser, together with Sebastien Loriot and Andreas Fabri, introduced
|
||||
the usage of interval arithmetic and square root extensions to achieve a certified result.
|
||||
|
||||
*/
|
||||
} /* namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/// \defgroup PkgPolylineDistanceRef dD Polyline Distance Reference
|
||||
/// \defgroup PkgPolylineDistanceConcepts Concepts
|
||||
/// \ingroup PkgPolylineDistanceRef
|
||||
/// \defgroup PkgPolylineDistanceFunctions Functions
|
||||
/// \defgroup PkgFrechetDistanceRef dD Polyline Distance Reference
|
||||
/// \defgroup PkgFrechetDistanceConcepts Concepts
|
||||
/// \ingroup PkgFrechetDistanceRef
|
||||
/// \defgroup PkgFrechetDistanceFunctions Functions
|
||||
/// You can add some text here if you want a description at the group level
|
||||
/// \ingroup PkgPolylineDistanceRef
|
||||
/// \ingroup PkgFrechetDistanceRef
|
||||
|
||||
|
||||
/*!
|
||||
\addtogroup PkgPolylineDistanceRef
|
||||
\addtogroup PkgFrechetDistanceRef
|
||||
|
||||
\cgalPkgDescriptionBegin{dD Polyline Distance,PkgPolylineDistance}
|
||||
\cgalPkgDescriptionBegin{dD Polyline Distance,PkgFrechetDistance}
|
||||
\cgalPkgPicture{pdist-pkg-small.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{André Nusser, Marvin Künnemann, and Karl Bringmann}
|
||||
\cgalPkgDesc{The package provides ... }
|
||||
\cgalPkgManuals{Chapter_dD_Frechet_distance,PkgPolylineDistanceRef}
|
||||
\cgalPkgManuals{Chapter_dD_Frechet_distance,PkgFrechetDistanceRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
||||
\cgalPkgShortInfoBegin
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
#include <CGAL/Frechet_distance.h>
|
||||
#include <CGAL/Frechet_distance_traits_3.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
using Kernel = CGAL::Simple_cartesian<double?;
|
||||
using Traits = CGAL::Frechet_distance_traits_3<Kernel>;
|
||||
using Point = Traits::Point;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::vector<Point> A, B;
|
||||
std::pair<double> res = CGAL::continuous_Frechet_distance<Traits>(A, B, 0.000001);
|
||||
std::cout << "The Frechet distance between the curves is between " << res.first << " and " << res.second << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ namespace CGAL
|
|||
{
|
||||
|
||||
/**
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \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
|
||||
|
|
@ -63,7 +63,7 @@ bool continuous_Frechet_distance_less_than(const PointRange& curve1,
|
|||
}
|
||||
|
||||
/**
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ double length_of_diagonal(const Bbox_3& bb)
|
|||
// TODO: Clean up Curve
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a trajectory. Additionally to the points given in the
|
||||
* input file, we also store the length of any prefix of the trajectory.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace internal {
|
|||
// decisions
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename K>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace internal {
|
|||
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename C>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace internal {
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename K>
|
||||
|
|
@ -66,7 +66,7 @@ using Boxes = std::vector<Box<K>>;
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename K>
|
||||
|
|
@ -105,7 +105,7 @@ struct Inputs {
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ struct Outputs {
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename K>
|
||||
|
|
@ -185,7 +185,7 @@ using QSimpleID = ID<QSimpleInterval<K>>;
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ struct QSimpleOutputs {
|
|||
//
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename K>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace internal {
|
|||
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a value in the interval `[0,1]`....
|
||||
*/
|
||||
template<typename C>
|
||||
|
|
@ -287,7 +287,7 @@ BFDirection toBFDirection(Direction direction);
|
|||
// TODO: does CGAL have any replacement for this or do we want our custom type
|
||||
// here?
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ template <typename C>
|
|||
std::ostream& operator<<(std::ostream& out, const Interval<C>& interval);
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* Data Types for FrechetLight:
|
||||
*
|
||||
* CPoint is integral part + rational [0,1] number given as sqrt_extension
|
||||
|
|
@ -461,7 +461,7 @@ using CPositions = std::vector<CPosition<C>>;
|
|||
using CurveID = std::size_t;
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* A class representing a
|
||||
*/
|
||||
template <typename C>
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace HLPred
|
|||
{
|
||||
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceFunctions
|
||||
* \ingroup PkgFrechetDistanceFunctions
|
||||
* computes
|
||||
*/
|
||||
template <typename C>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
namespace CGAL
|
||||
{
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceRef
|
||||
* \ingroup PkgFrechetDistanceRef
|
||||
* This class ...
|
||||
* \cgalModels{FrechetDistanceTraits}
|
||||
* \tparam GT geometric traits class
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
namespace CGAL
|
||||
{
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceRef
|
||||
* \ingroup PkgFrechetDistanceRef
|
||||
* This class ...
|
||||
* \cgalModels{FrechetDistanceTraits}
|
||||
* \tparam GT geometric traits class
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
namespace CGAL
|
||||
{
|
||||
/*!
|
||||
* \ingroup PkgPolylineDistanceRef
|
||||
* \ingroup PkgFrechetDistanceRef
|
||||
* This class ...
|
||||
* \cgalModels{FrechetDistanceTraits}
|
||||
* \tparam GT geometric traits class
|
||||
|
|
|
|||
Loading…
Reference in New Issue