mirror of https://github.com/CGAL/cgal
Rename package, remove default for epsilon
This commit is contained in:
parent
89a3a89e34
commit
fdbb47b56c
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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()`
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/*!
|
||||
\example Frechet_distance/Frechet_distance_2.cpp
|
||||
*/
|
||||
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
|
@ -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 )
|
||||
|
||||
|
|
@ -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[])
|
||||
|
|
@ -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[])
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -55,22 +55,25 @@ 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.
|
||||
|
|
@ -78,14 +81,14 @@ bool continuous_Frechet_distance_less_than(const PointRange& curve1,
|
|||
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
|
||||
|
|
@ -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>
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
#include <vector>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -96,5 +96,5 @@ private:
|
|||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -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>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#include <vector>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
double length_of_diagonal(const Bbox_2& bb)
|
||||
|
|
@ -298,5 +298,5 @@ std::ostream& operator<<(std::ostream& out, const Curve<K>& curve)
|
|||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -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
|
||||
|
|
@ -46,9 +46,9 @@ private:
|
|||
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;
|
||||
|
|
@ -499,5 +499,5 @@ bool Filter<K>::negative(PointID position1, PointID position2)
|
|||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -23,14 +23,14 @@
|
|||
// =============================================================================
|
||||
|
||||
#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/filter.h>
|
||||
#include <CGAL/Polyline_distance/internal/frechet_light_types.h>
|
||||
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
|
||||
#include <CGAL/Polyline_distance/internal/id.h>
|
||||
#include <CGAL/Polyline_distance/internal/high_level_predicates.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/filter.h>
|
||||
#include <CGAL/Frechet_distance/internal/frechet_light_types.h>
|
||||
#include <CGAL/Frechet_distance/internal/geometry_basics.h>
|
||||
#include <CGAL/Frechet_distance/internal/id.h>
|
||||
#include <CGAL/Frechet_distance/internal/high_level_predicates.h>
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
#include <vector>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
|
||||
|
|
@ -54,20 +54,20 @@ class FrechetLight
|
|||
using Point = typename C::Point;
|
||||
using PointID = typename Curve::PointID;
|
||||
using distance_t = typename Curve::distance_t;
|
||||
using CPoint = CGAL::Polyline_distance::internal::CPoint<C>;
|
||||
using CInterval = CGAL::Polyline_distance::internal::CInterval<C>;
|
||||
using CIntervals = CGAL::Polyline_distance::internal::CIntervals<C>;
|
||||
using CIntervalsID = CGAL::Polyline_distance::internal::CIntervalsID<C>;
|
||||
using CPosition = CGAL::Polyline_distance::internal::CPosition<C>;
|
||||
using QSimpleInterval = CGAL::Polyline_distance::internal::QSimpleInterval<C>;
|
||||
using QSimpleIntervals = CGAL::Polyline_distance::internal::QSimpleIntervals<C>;
|
||||
using QSimpleOutputs = CGAL::Polyline_distance::internal::QSimpleOutputs<C>;
|
||||
using Certificate = CGAL::Polyline_distance::internal::Certificate<C>;
|
||||
using Filter = CGAL::Polyline_distance::internal::Filter<C>;
|
||||
using Inputs = CGAL::Polyline_distance::internal::Inputs<C>;
|
||||
using Outputs = CGAL::Polyline_distance::internal::Outputs<C>;
|
||||
using BoxData = CGAL::Polyline_distance::internal::BoxData<C>;
|
||||
using Lambda = CGAL::Polyline_distance::internal::Lambda<C>;
|
||||
using CPoint = CGAL::Frechet_distance::internal::CPoint<C>;
|
||||
using CInterval = CGAL::Frechet_distance::internal::CInterval<C>;
|
||||
using CIntervals = CGAL::Frechet_distance::internal::CIntervals<C>;
|
||||
using CIntervalsID = CGAL::Frechet_distance::internal::CIntervalsID<C>;
|
||||
using CPosition = CGAL::Frechet_distance::internal::CPosition<C>;
|
||||
using QSimpleInterval = CGAL::Frechet_distance::internal::QSimpleInterval<C>;
|
||||
using QSimpleIntervals = CGAL::Frechet_distance::internal::QSimpleIntervals<C>;
|
||||
using QSimpleOutputs = CGAL::Frechet_distance::internal::QSimpleOutputs<C>;
|
||||
using Certificate = CGAL::Frechet_distance::internal::Certificate<C>;
|
||||
using Filter = CGAL::Frechet_distance::internal::Filter<C>;
|
||||
using Inputs = CGAL::Frechet_distance::internal::Inputs<C>;
|
||||
using Outputs = CGAL::Frechet_distance::internal::Outputs<C>;
|
||||
using BoxData = CGAL::Frechet_distance::internal::BoxData<C>;
|
||||
using Lambda = CGAL::Frechet_distance::internal::Lambda<C>;
|
||||
using CurvePair = std::array<Curve const*, 2>;
|
||||
|
||||
public:
|
||||
|
|
@ -1546,5 +1546,5 @@ template <typename C>
|
|||
std::size_t FrechetLight<C>::getNumberOfBoxes() const { return num_boxes; }
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -23,15 +23,15 @@
|
|||
// =============================================================================
|
||||
|
||||
#pragma once
|
||||
#include <CGAL/license/Polyline_distance.h>
|
||||
#include <CGAL/license/Frechet_distance.h>
|
||||
#include <vector>
|
||||
|
||||
#include <CGAL/Polyline_distance/internal/curve.h>
|
||||
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
|
||||
#include <CGAL/Polyline_distance/internal/id.h>
|
||||
#include <CGAL/Frechet_distance/internal/curve.h>
|
||||
#include <CGAL/Frechet_distance/internal/geometry_basics.h>
|
||||
#include <CGAL/Frechet_distance/internal/id.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
//
|
||||
|
|
@ -126,8 +126,8 @@ struct Outputs {
|
|||
template <typename K>
|
||||
struct QSimpleInterval {
|
||||
using PointID = typename K::PointID;
|
||||
using CPoint = CGAL::Polyline_distance::internal::CPoint<K>;
|
||||
using CInterval = CGAL::Polyline_distance::internal::CInterval<K>;
|
||||
using CPoint = CGAL::Frechet_distance::internal::CPoint<K>;
|
||||
using CInterval = CGAL::Frechet_distance::internal::CInterval<K>;
|
||||
|
||||
QSimpleInterval() : valid(false) {}
|
||||
QSimpleInterval(CPoint const& begin, CPoint const& end)
|
||||
|
|
@ -212,5 +212,5 @@ struct BoxData {
|
|||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
// =============================================================================
|
||||
|
||||
#pragma once
|
||||
#include <CGAL/license/Polyline_distance.h>
|
||||
#include <CGAL/license/Frechet_distance.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
|
|
@ -38,11 +38,11 @@
|
|||
#include <CGAL/Sqrt_extension.h>
|
||||
#include <CGAL/Interval_nt.h>
|
||||
|
||||
#include <CGAL/Polyline_distance/internal/id.h>
|
||||
#include <CGAL/Polyline_distance/internal/curve.h>
|
||||
#include <CGAL/Frechet_distance/internal/id.h>
|
||||
#include <CGAL/Frechet_distance/internal/curve.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
|
||||
|
|
@ -195,11 +195,11 @@ struct Lambda {
|
|||
}
|
||||
};
|
||||
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace internal
|
||||
|
||||
template <typename C>
|
||||
bool is_one(const Polyline_distance::internal::Lambda<C>& lambda)
|
||||
bool is_one(const Frechet_distance::internal::Lambda<C>& lambda)
|
||||
{
|
||||
if (lambda.is_one) return true;
|
||||
if (lambda.is_zero) return false;
|
||||
|
|
@ -212,7 +212,7 @@ bool is_one(const Polyline_distance::internal::Lambda<C>& lambda)
|
|||
}
|
||||
|
||||
template <typename C>
|
||||
bool is_zero(const Polyline_distance::internal::Lambda<C>& lambda)
|
||||
bool is_zero(const Frechet_distance::internal::Lambda<C>& lambda)
|
||||
{
|
||||
if (lambda.is_zero) return true;
|
||||
if (lambda.is_one) return false;
|
||||
|
|
@ -226,14 +226,14 @@ bool is_zero(const Polyline_distance::internal::Lambda<C>& lambda)
|
|||
|
||||
/*
|
||||
template <typename K>
|
||||
CGAL::Interval_nt<false> to_interval(const Polyline_distance::internal::Lambda<K>& lambda)
|
||||
CGAL::Interval_nt<false> to_interval(const Frechet_distance::internal::Lambda<K>& lambda)
|
||||
{
|
||||
return lambda.approx;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
namespace Polyline_distance
|
||||
namespace Frechet_distance
|
||||
{
|
||||
namespace internal {
|
||||
|
||||
|
|
@ -609,5 +609,5 @@ std::ostream& operator<<(std::ostream& out, const CInterval<C>& interval)
|
|||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -23,12 +23,12 @@
|
|||
// =============================================================================
|
||||
|
||||
#pragma once
|
||||
#include <CGAL/license/Polyline_distance.h>
|
||||
#include <CGAL/license/Frechet_distance.h>
|
||||
|
||||
#include <CGAL/Polyline_distance/internal/geometry_basics.h>
|
||||
#include <CGAL/Frechet_distance/internal/geometry_basics.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
|
||||
|
||||
|
|
@ -168,5 +168,5 @@ Interval<C> intersection_interval(C const& curve1,
|
|||
} // namespace HLPred
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
|
@ -23,14 +23,14 @@
|
|||
// =============================================================================
|
||||
|
||||
#pragma once
|
||||
#include <CGAL/license/Polyline_distance.h>
|
||||
#include <CGAL/license/Frechet_distance.h>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polyline_distance {
|
||||
namespace Frechet_distance {
|
||||
namespace internal {
|
||||
// Typesafe ID class such that there are compiler errors if different IDs are
|
||||
// mixed. The template parameter T is just there to assure this behavior.
|
||||
|
|
@ -68,7 +68,7 @@ private:
|
|||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace Polyline_distance
|
||||
} // namespace Frechet_distance
|
||||
} // namespace CGAL
|
||||
|
||||
// define custom hash function to be able to use IDs with maps/sets
|
||||
|
|
@ -76,9 +76,9 @@ namespace std
|
|||
{
|
||||
|
||||
template <typename T>
|
||||
struct hash<CGAL::Polyline_distance::internal::ID<T>> {
|
||||
using IDType = typename CGAL::Polyline_distance::internal::ID<T>::IDType;
|
||||
std::size_t operator()(CGAL::Polyline_distance::internal::ID<T> const& id) const noexcept
|
||||
struct hash<CGAL::Frechet_distance::internal::ID<T>> {
|
||||
using IDType = typename CGAL::Frechet_distance::internal::ID<T>::IDType;
|
||||
std::size_t operator()(CGAL::Frechet_distance::internal::ID<T> const& id) const noexcept
|
||||
{
|
||||
return std::hash<IDType>()(id);
|
||||
}
|
||||
|
|
@ -25,10 +25,10 @@
|
|||
#ifndef CGAL_FRECHET_DISTANCE_NEAR_NEIGHBORS_DS_H
|
||||
#define CGAL_FRECHET_DISTANCE_NEAR_NEIGHBORS_DS_H
|
||||
|
||||
#include <CGAL/license/Polyline_distance.h>
|
||||
#include <CGAL/license/Frechet_distance.h>
|
||||
#include <CGAL/Frechet_distance.h>
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Polyline_distance/internal/Frechet_distance_near_neighbors_ds.h>
|
||||
#include <CGAL/Frechet_distance/internal/Frechet_distance_near_neighbors_ds.h>
|
||||
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
namespace CGAL
|
||||
{
|
||||
|
||||
// TODO: hide away in Polyline_distance::internal (different naming but nvm)
|
||||
// TODO: hide away in Frechet_distance::internal (different naming but nvm)
|
||||
template <typename PointRange>
|
||||
using PointRangeKernel = typename CGAL::Kernel_traits<
|
||||
typename std::iterator_traits<typename PointRange::iterator>::value_type>::
|
||||
|
|
@ -63,7 +63,7 @@ public:
|
|||
|
||||
private:
|
||||
Polylines curves;
|
||||
Polyline_distance::internal::FrechetKdTree<Traits> kd_tree;
|
||||
Frechet_distance::internal::FrechetKdTree<Traits> kd_tree;
|
||||
};
|
||||
|
||||
// TODO: store preprocessed curves after CGALization
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
// Andreas Fabri
|
||||
// =============================================================================
|
||||
|
||||
#ifndef CGAL_POLYLINE_DISTANCE_TRAITS_2_H
|
||||
#define CGAL_POLYLINE_DISTANCE_TRAITS_2_H
|
||||
#ifndef CGAL_Frechet_distance_TRAITS_2_H
|
||||
#define CGAL_Frechet_distance_TRAITS_2_H
|
||||
|
||||
#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/Bbox_2.h>
|
||||
|
||||
// TODO: is it too restrictive to use vectors by default?
|
||||
|
|
@ -41,7 +41,7 @@ namespace CGAL
|
|||
* \tparam GT geometric traits class
|
||||
*/
|
||||
template <class GT>
|
||||
class Polyline_distance_traits_2
|
||||
class Frechet_distance_traits_2
|
||||
{
|
||||
public:
|
||||
using Kernel = GT;
|
||||
|
|
@ -60,4 +60,4 @@ public:
|
|||
|
||||
} // end of namespace CGAL
|
||||
|
||||
#endif // CGAL_POLYLINE_DISTANCE_TRAITS_2_H
|
||||
#endif // CGAL_Frechet_distance_TRAITS_2_H
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
// Andreas Fabri
|
||||
// =============================================================================
|
||||
|
||||
#ifndef CGAL_POLYLINE_DISTANCE_TRAITS_3_H
|
||||
#define CGAL_POLYLINE_DISTANCETRAITS_3_H
|
||||
#ifndef CGAL_Frechet_distance_TRAITS_3_H
|
||||
#define CGAL_Frechet_distanceTRAITS_3_H
|
||||
|
||||
#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/Bbox_3.h>
|
||||
|
||||
// TODO: add doxygen code
|
||||
|
|
@ -45,7 +45,7 @@ namespace CGAL
|
|||
* \tparam GT geometric traits class
|
||||
*/
|
||||
template <class GT>
|
||||
class Polyline_distance_traits_3
|
||||
class Frechet_distance_traits_3
|
||||
{
|
||||
public:
|
||||
using Kernel = GT;
|
||||
|
|
@ -64,4 +64,4 @@ public:
|
|||
|
||||
} // end of namespace CGAL
|
||||
|
||||
#endif // CGAL_POLYLINE_DISTANCE_TRAITS_3_H
|
||||
#endif // CGAL_Frechet_distance_TRAITS_3_H
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
// Andreas Fabri
|
||||
// =============================================================================
|
||||
|
||||
#ifndef CGAL_POLYLINE_DISTANCE_TRAITS_D_H
|
||||
#define CGAL_POLYLINE_DISTANCE_TRAITS_D_H
|
||||
#ifndef CGAL_Frechet_distance_TRAITS_D_H
|
||||
#define CGAL_Frechet_distance_TRAITS_D_H
|
||||
|
||||
#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/Interval_nt.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Bbox_d.h>
|
||||
|
|
@ -43,7 +43,7 @@ namespace CGAL
|
|||
* \tparam GT geometric traits class
|
||||
*/
|
||||
template <class GT>
|
||||
class Polyline_distance_traits_d
|
||||
class Frechet_distance_traits_d
|
||||
{
|
||||
public:
|
||||
static constexpr int dimension = typename GT::Dimension::value;
|
||||
|
|
@ -62,4 +62,4 @@ public:
|
|||
|
||||
} // end of namespace CGAL
|
||||
|
||||
#endif // CGAL_POLYLINE_DISTANCE_TRAITS_D_H
|
||||
#endif // CGAL_Frechet_distance_TRAITS_D_H
|
||||
|
|
@ -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_Test )
|
||||
project( Frechet_distance_Test )
|
||||
|
||||
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core )
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#include <CGAL/Frechet_distance.h>
|
||||
#include <CGAL/Polyline_distance_traits_2.h>
|
||||
#include <CGAL/Frechet_distance_traits_2.h>
|
||||
#include <CGAL/Frechet_distance_near_neighbors_ds.h>
|
||||
#include <CGAL/Root_of_traits.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
|
|
@ -29,7 +29,7 @@ using TestKernel = CGAL::Simple_cartesian<double>;
|
|||
//using TestKernel = CGAL::Exact_predicates_exact_constructions_kernel;
|
||||
//using TestKernel = CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt;
|
||||
|
||||
using TestTraits = CGAL::Polyline_distance_traits_2<TestKernel>;
|
||||
using TestTraits = CGAL::Frechet_distance_traits_2<TestKernel>;
|
||||
using TestPoint = TestKernel::Point_2;
|
||||
using TestCurve = std::vector<TestPoint>;
|
||||
using TestCurves = std::vector<TestCurve>;
|
||||
|
|
@ -137,7 +137,7 @@ FrechetDistanceNearNeighborsDSQueries readFrechetDistanceNearNeighborsDSQueries(
|
|||
std::stringstream ss(line);
|
||||
ss >> query.id >> query.distance;
|
||||
|
||||
CGAL::Polyline_distance::internal::CurveID result_id;
|
||||
CGAL::Frechet_distance::internal::CurveID result_id;
|
||||
while (ss >> result_id) {
|
||||
query.expected_result.push_back(result_id);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue