mirror of https://github.com/CGAL/cgal
linking
This commit is contained in:
parent
c22dcc53a5
commit
f7bd575b2c
|
|
@ -6,30 +6,26 @@ namespace CGAL {
|
||||||
|
|
||||||
`Hilbert_policy` is a policy class which can be used to parameterize a strategy policy
|
`Hilbert_policy` is a policy class which can be used to parameterize a strategy policy
|
||||||
in order to specify the strategy for spatial sorting.
|
in order to specify the strategy for spatial sorting.
|
||||||
`Hilbert_policy<Median>`
|
`Hilbert_policy<Median>` or `Hilbert_policy<Middle>`
|
||||||
or
|
can be passed as parameter to
|
||||||
`Hilbert_policy<Middle>`
|
`hilbert_sort()` to choose the sorting policy.
|
||||||
can be passed to
|
|
||||||
as parameter to
|
|
||||||
`hilbert_sort` to choose the sorting policy.
|
|
||||||
|
|
||||||
### Parameters ###
|
|
||||||
|
|
||||||
`Tag` can only be either `Median` or `Middle` currently.
|
\tparam Tag must be either `Median` or `Middle`.
|
||||||
|
|
||||||
\models ::DefaultConstructible, CopyConstructible
|
\models ::DefaultConstructible, CopyConstructible
|
||||||
|
|
||||||
\sa `Median`
|
\sa `Median`
|
||||||
\sa `Middle`
|
\sa `Middle`
|
||||||
\sa `Hilbert_sort__median_policy`
|
\sa `Hilbert_sort_median_policy`
|
||||||
\sa `Hilbert_sort__middle_policy`
|
\sa `Hilbert_sort_middle_policy`
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template< typename Tag >
|
template< typename Tag >
|
||||||
class Hilbert_policy {
|
class Hilbert_policy {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Hilbert_policy */
|
}; /* end Hilbert_policy */
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
@ -41,19 +37,9 @@ namespace CGAL {
|
||||||
|
|
||||||
A typedef to `Hilbert_policy<Median>`.
|
A typedef to `Hilbert_policy<Median>`.
|
||||||
|
|
||||||
\sa `Median`
|
|
||||||
\sa `Middle`
|
|
||||||
\sa `Hilbert_policy`
|
|
||||||
\sa `Hilbert_sort__middle_policy`
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Hilbert_sort_median_policy {
|
typedef Hilbert_policy<Median> Hilbert_sort_median_policy;
|
||||||
public:
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Hilbert_sort_median_policy */
|
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -63,19 +49,9 @@ namespace CGAL {
|
||||||
|
|
||||||
A typedef to `Hilbert_policy<Middle>`.
|
A typedef to `Hilbert_policy<Middle>`.
|
||||||
|
|
||||||
\sa `Median`
|
|
||||||
\sa `Middle`
|
|
||||||
\sa `Hilbert_sort__median_policy`
|
|
||||||
\sa `Hilbert_policy`
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Hilbert_sort_middle_policy {
|
typedef Hilbert_policy<Middle> Hilbert_sort_middle_policy;
|
||||||
public:
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Hilbert_sort_middle_policy */
|
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -101,7 +77,6 @@ as parameter to
|
||||||
class Median {
|
class Median {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Median */
|
}; /* end Median */
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
@ -129,7 +104,6 @@ as parameter to
|
||||||
class Middle {
|
class Middle {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Middle */
|
}; /* end Middle */
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Hilbert_sort_2(const Traits &traits = Traits());
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
sorts the range [`begin`, `end`).
|
sorts the range [`begin`, `end`).
|
||||||
\requires `RandomAccessIterator::value_type` equals to `Traits::Point_2`.
|
\requires `std::iterator_traits<RandomAccessIterator>::value_type` equals to `Traits::Point_2`.
|
||||||
*/
|
*/
|
||||||
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Hilbert_sort_3(const Traits &traits = Traits());
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
sorts the range [`begin`, `end`).
|
sorts the range [`begin`, `end`).
|
||||||
\requires `RandomAccessIterator::value_type` equals to `Traits::Point_3`.
|
\requires `std::iterator_traits<RandomAccessIterator>::value_type` equals to `Traits::Point_3`.
|
||||||
*/
|
*/
|
||||||
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Hilbert_sort_d(const Traits &traits = Traits());
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
sorts the range [`begin`, `end`).
|
sorts the range [`begin`, `end`).
|
||||||
\requires `RandomAccessIterator::value_type` equals to `Traits::Point_d`.
|
\requires `std::iterator_traits<RandomAccessIterator>::value_type` equals to `Traits::Point_d`.
|
||||||
*/
|
*/
|
||||||
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
template <class RandomAccessIterator> void operator() (RandomAccessIterator begin, RandomAccessIterator end) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,9 @@ reorder of the keys instead of the points, the comparisons being done on the ass
|
||||||
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
||||||
while the actual point type is `Base_traits::Point_2`.
|
while the actual point type is `Base_traits::Point_2`.
|
||||||
|
|
||||||
### Requirements ###
|
|
||||||
|
|
||||||
`Base_traits` is a model for `SpatialSortingTraits_2`.
|
\tparam Base_traits must be a model for `SpatialSortingTraits_2`.
|
||||||
`PointPropertyMap` is a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
\tparam PointPropertyMap must be a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
||||||
with `Base_traits::Point_2` as `value_type`.
|
with `Base_traits::Point_2` as `value_type`.
|
||||||
|
|
||||||
\models ::SpatialSortingTraits_2
|
\models ::SpatialSortingTraits_2
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,9 @@ reorder of the keys instead of the points, the comparisons being done on the ass
|
||||||
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
||||||
while the actual point type is `Base_traits::Point_3`.
|
while the actual point type is `Base_traits::Point_3`.
|
||||||
|
|
||||||
### Requirements ###
|
|
||||||
|
|
||||||
`Base_traits` is a model for `SpatialSortingTraits_3`.
|
\tparam Base_traits must be a model for `SpatialSortingTraits_3`.
|
||||||
`PointPropertyMap` is a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
\tparam PointPropertyMap must be a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
||||||
with `Base_traits::Point_3` as `value_type`.
|
with `Base_traits::Point_3` as `value_type`.
|
||||||
|
|
||||||
\models ::SpatialSortingTraits_3
|
\models ::SpatialSortingTraits_3
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,9 @@ reorder of the keys instead of the points, the comparisons being done on the ass
|
||||||
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
In other words, the traits provides to a spatial sort algorithm a point type which is a key,
|
||||||
while the actual point type is `Base_traits::Point_d`.
|
while the actual point type is `Base_traits::Point_d`.
|
||||||
|
|
||||||
### Requirements ###
|
|
||||||
|
|
||||||
`Base_traits` is a model for `SpatialSortingTraits_d`.
|
\tparam Base_traits must be a model for `SpatialSortingTraits_d`.
|
||||||
`PointPropertyMap` is a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
\tparam PointPropertyMap must be a model of <A HREF="http://www.boost.org/doc/libs/release/libs/property_map/doc/ReadablePropertyMap.html">boost::ReadablePropertyMap</A>
|
||||||
with `Base_traits::Point_d` as `value_type`.
|
with `Base_traits::Point_d` as `value_type`.
|
||||||
|
|
||||||
\models ::SpatialSortingTraits_d
|
\models ::SpatialSortingTraits_d
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ along a Hilbert curve.
|
||||||
sorts the range [`begin`,`end`) in place.
|
sorts the range [`begin`,`end`) in place.
|
||||||
|
|
||||||
The default traits class `Default_traits` is the kernel in which the type
|
The default traits class `Default_traits` is the kernel in which the type
|
||||||
`RandomAccessIterator::value_type` is defined.
|
`std::iterator_traits<RandomAccessIterator>::value_type` is defined.
|
||||||
The default policy is `Hilbert_sort_median_policy()` and the
|
The default policy is `Hilbert_sort_median_policy()` and the
|
||||||
other option is `Hilbert_sort_middle_policy()`.
|
other option is `Hilbert_sort_middle_policy()`.
|
||||||
|
|
||||||
### Requirements ###
|
### Requirements ###
|
||||||
|
|
||||||
<OL>
|
<OL>
|
||||||
<LI>`RandomAccessIterator::value_type` is convertible to
|
<LI>`std::iterator_traits<RandomAccessIterator>::value_type` is convertible to
|
||||||
`Traits::Point_2`, `Traits::Point_3`, or `Traits::Point_d`.
|
`Traits::Point_2`, `Traits::Point_3`, or `Traits::Point_d`.
|
||||||
<LI>`Traits` is a model for concept `SpatialSortingTraits_2`,
|
<LI>`Traits` is a model for concept `SpatialSortingTraits_2`,
|
||||||
`SpatialSortingTraits_3`, or `SpatialSortingTraits_d`.
|
`SpatialSortingTraits_3`, or `SpatialSortingTraits_d`.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ of being close in the order.
|
||||||
sorts the range [`begin`,`end`) in place.
|
sorts the range [`begin`,`end`) in place.
|
||||||
|
|
||||||
The default traits class `Default_traits` is the kernel in which the type
|
The default traits class `Default_traits` is the kernel in which the type
|
||||||
`RandomAccessIterator::value_type` is defined.
|
`std::iterator_traits<RandomAccessIterator>::value_type` is defined.
|
||||||
|
|
||||||
The default policy is `Hilbert_sort_median_policy()` and the
|
The default policy is `Hilbert_sort_median_policy()` and the
|
||||||
other option is `Hilbert_sort_middle_policy()`.
|
other option is `Hilbert_sort_middle_policy()`.
|
||||||
|
|
@ -21,7 +21,7 @@ The default values for the thresholds and the ratio depends on the dimension.
|
||||||
### Requirements ###
|
### Requirements ###
|
||||||
|
|
||||||
<OL>
|
<OL>
|
||||||
<LI>`RandomAccessIterator::value_type` is convertible to
|
<LI>`std::iterator_traits<RandomAccessIterator>::value_type` is convertible to
|
||||||
`Traits::Point_2`, `Traits::Point_3`, or `Traits::Point_d`.
|
`Traits::Point_2`, `Traits::Point_3`, or `Traits::Point_d`.
|
||||||
<LI>`Traits` is a model for concept `SpatialSortingTraits_2`,
|
<LI>`Traits` is a model for concept `SpatialSortingTraits_2`,
|
||||||
`SpatialSortingTraits_3`, or `SpatialSortingTraits_d`.
|
`SpatialSortingTraits_3`, or `SpatialSortingTraits_d`.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ primitives (objects and predicates) that the sorting algorithms use.
|
||||||
`SpatialSortingTraits_d` defines the complete set of primitives required in these
|
`SpatialSortingTraits_d` defines the complete set of primitives required in these
|
||||||
functions and functors.
|
functions and functors.
|
||||||
|
|
||||||
\hasModel Any \cgal \f$ d\f$ dimensional kernel.
|
\hasModel Any \cgal `d`-dimensional kernel.
|
||||||
\hasModel `CGAL::Spatial_sort_traits_adapter_d<Base_traits,PointPropertyMap>`
|
\hasModel `CGAL::Spatial_sort_traits_adapter_d<Base_traits,PointPropertyMap>`
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -141,9 +141,8 @@ as an alternative.
|
||||||
|
|
||||||
\cgalexample{Spatial_sorting/myPoint.cpp}
|
\cgalexample{Spatial_sorting/myPoint.cpp}
|
||||||
|
|
||||||
## Sorting Arbitrary Types ##
|
## Sorting Arbitrary Types ## {#secsort_any_type}
|
||||||
|
|
||||||
\anchor secsort_any_type
|
|
||||||
The spatial sorting traits class provides a point type and
|
The spatial sorting traits class provides a point type and
|
||||||
functors for comparing, for example, the `x`-coordinates
|
functors for comparing, for example, the `x`-coordinates
|
||||||
of two points.
|
of two points.
|
||||||
|
|
@ -157,9 +156,9 @@ which allows to obtain a point from whatever you want to sort.
|
||||||
|
|
||||||
The following examples illustrate the usage of these traits class adapters.
|
The following examples illustrate the usage of these traits class adapters.
|
||||||
|
|
||||||
## Sorting Using Pairs of Points and Integers ##
|
## Sorting Using Pairs of Points and Integers ## {#secsort_any_type_2}
|
||||||
|
|
||||||
|
|
||||||
\anchor secsort_any_type_2
|
|
||||||
In this example program, the sorted sequence of points is retrieved
|
In this example program, the sorted sequence of points is retrieved
|
||||||
using a vector of pairs of points and integers.
|
using a vector of pairs of points and integers.
|
||||||
\cgalexample{Spatial_sorting/sp_sort_using_property_map_2.cpp}
|
\cgalexample{Spatial_sorting/sp_sort_using_property_map_2.cpp}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue