Polish dD Spatial Searching

This commit is contained in:
Andreas Fabri 2012-11-23 13:59:31 +01:00
parent 867e4396b7
commit 72f48d7e8d
22 changed files with 59 additions and 64 deletions

View File

@ -10,7 +10,7 @@ To optimize distance computations squared distances are used.
### Parameters ###
Expects for the first template argument a model of the concept
`SearchTraits`, for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`.
`SearchTraits`, for example `Search_traits_2<Simple_cartesian<double> >`.
\cgalModels `OrthogonalDistance`

View File

@ -12,7 +12,7 @@ Euclidean distance between a \f$ d\f$-dimensional sphere and a
### Parameters ###
Expects for the template argument a model of the concept `SearchTraits`,
for example `CGAL::Cartesian_d<double>`.
for example `Simple_cartesian_d<double>`.
\cgalModels `GeneralDistance`

View File

@ -63,7 +63,7 @@ Fuzzy_iso_box(Traits::Base::Point_d p, Traits::Base::Point_d q, FT epsilon=FT(0)
/// @{
/*!
test whether `b` contains `p`.
test whether the fuzzy iso box contains `p`.
*/
bool contains(Point_d p) const;

View File

@ -59,7 +59,7 @@ Fuzzy_sphere(Traits::Base::Point_d center, FT radius, FT epsilon=FT(0), Traits t
/// @{
/*!
test whether \f$ s\f$ contains \f$ p\f$.
test whether the fuzzy sphere contains `p`.
*/
bool contains(const Point_d& p) const;

View File

@ -9,20 +9,20 @@ on a tree. The tree may have extended or unextended nodes.
### Parameters ###
Expects for the first template argument a model of the concept `SearchTraits`,
for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`.
for example `Search_traits_2<Simple_cartesian<double> >`.
Expects for the second template argument a model of the
concept `GeneralDistance`. If `Traits` is
`CGAL::Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `CGAL::Distance_for_point_adapter<Key,PointPropertyMap,CGAL::Euclidean_distance<Traits> >`,
and `CGAL::Euclidean_distance<Traits>` otherwise.
`Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `Distance_for_point_adapter<Key,PointPropertyMap,Euclidean_distance<Traits> >`,
and `Euclidean_distance<Traits>` otherwise.
Expects for third template argument a model of the concept `Splitter`.
The default type is `CGAL::Sliding_midpoint<Traits>`.
The default type is `Sliding_midpoint<Traits>`.
Expects for fourth template argument a model of the concept `SpatialTree`.
The default type is `CGAL::Kd_tree<Traits,Splitter,CGAL::Tag_false>`. The
template argument `CGAL::Tag_false` makes that the tree is built with unextended nodes.
The default type is `Kd_tree<Traits,Splitter,Tag_false>`. The
template argument `Tag_false` makes that the tree is built with unextended nodes.
\sa `CGAL::Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree>`

View File

@ -10,17 +10,17 @@ extended or unextended nodes.
### Parameters ###
Expects for the first template argument an implementation of the concept `SearchTraits`,
for example `CGAL::Cartesian_d<double>`.
for example `Simple_cartesian<double>`.
Expects for the second template argument a model of the
concept `GeneralDistance`. If `Traits` is
`CGAL::Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `CGAL::Distance_for_point_adapter<Key,PointPropertyMap,CGAL::Euclidean_distance<Traits> >`,
and `CGAL::Euclidean_distance<Traits>` otherwise.
`Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `Distance_for_point_adapter<Key,PointPropertyMap,Euclidean_distance<Traits> >`,
and `Euclidean_distance<Traits>` otherwise.
Expects for fourth template argument an implementation of the concept `SpatialTree`.
The default type is `CGAL::Kd_tree<Traits, Splitter, CGAL::Tag_false>`. The
template argument `CGAL::Tag_false` makes that the tree is built with unextended nodes.
The default type is `Kd_tree<Traits, Splitter, Tag_false>`. The
template argument `Tag_false` makes that the tree is built with unextended nodes.
\sa `CGAL::Orthogonal_k_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree>`

View File

@ -8,13 +8,13 @@ The class `Kd_tree` defines a `k-d` tree.
### Parameters ###
Expects for the first template argument a model of the concept
`SearchTraits`, for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`.
`SearchTraits`, for example `Search_traits_2<Simple_cartesian<double> >`.
Expects for the second template argument a model for the concept `Splitter`.
It defaults to `Sliding_midpoint<Traits>`.
Expects for the third template argument `CGAL::Tag_true`, if the
tree shall be built with extended nodes, and `CGAL::Tag_false` otherwise.
Expects for the third template argument `Tag_true`, if the
tree shall be built with extended nodes, and `Tag_false` otherwise.
\sa Tree
\sa `CGAL::Kd_tree_node<Traits>`

View File

@ -5,7 +5,7 @@ namespace CGAL {
The class `Kd_tree_node` implements a node class for a `k-d` tree.
\cgalAdvanced A node is either a leaf node, an internal node or an
A node is either a leaf node, an internal node or an
extended internal node. A leaf node contains one or more points. An
internal node contains a pointer to its lower child, a pointer to its
upper child, and a pointer to its separator. An extended internal
@ -15,7 +15,7 @@ extended node's rectangle along the node's cutting dimension.
### Parameters ###
Expects for the template argument a model of the concept `SearchTraits`,
for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`, or `CGAL::Cartesian_d<double>`.
for example `Search_traits_2<Simple_cartesian<double> >`, or `Cartesian_d<double>`.
*/
template< typename Traits, typename Splitter, typename UseExtendedNode >

View File

@ -31,7 +31,7 @@ in each dimension.
Kd_tree_rectangle(int d);
/*!
Constructs the bounding box of the points in the range [`begin,end`), where the value
Constructs the bounding box of the points in the range `[begin,end)`, where the value
type of `PointIter` can be used by operators of functors `Construct_cartesian_const_iterator_d`
to define iterators with value type `FT`.
*/

View File

@ -13,7 +13,7 @@ and a `d`-dimensional iso-box defined as a `k-d` tree rectangle.
### Parameters ###
Expects for the template argument a model for the concept
`SearchTraits`, for example `CGAL::Search_traits_3<CGAL::Cartesian<double> >`.
`SearchTraits`, for example `Search_traits_3<Simple_cartesian<double> >`.
\cgalModels `GeneralDistance`

View File

@ -8,20 +8,20 @@ The class `Orthogonal_incremental_neighbor_search` implements incremental neares
### Parameters ###
Expects for the first template argument a model of the concept `SearchTraits`,
for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`.
for example `Search_traits_2<Simple_cartesian<double> >`.
Expects for the second template argument a model of the
concept `GeneralDistance`. If `Traits` is
`CGAL::Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `CGAL::Distance_for_point_adapter<Key,PointPropertyMap,CGAL::Euclidean_distance<Traits> >`,
and `CGAL::Euclidean_distance<Traits>` otherwise.
`Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `Distance_for_point_adapter<Key,PointPropertyMap,Euclidean_distance<Traits> >`,
and `Euclidean_distance<Traits>` otherwise.
Expects for third template argument a model of the concept `Splitter`.
The default type is `CGAL::Sliding_midpoint<Traits>`.
The default type is `Sliding_midpoint<Traits>`.
Expects for fourth template argument a model of the concept `SpatialTree`.
The default type is `CGAL::Kd_tree<Traits, Splitter, CGAL::Tag_true>`. The
template argument must be `CGAL::Tag_true` because orthogonal search needs extended
The default type is `Kd_tree<Traits, Splitter, Tag_true>`. The
template argument must be `Tag_true` because orthogonal search needs extended
kd tree nodes.
\sa `CGAL::Incremental_neighbor_search<Traits, GeneralDistance, SpatialTree>`

View File

@ -10,23 +10,22 @@ using an orthogonal distance class.
### Parameters ###
Expects for the first template argument an implementation of the concept `SearchTraits`,
for example `CGAL::Search_traits_2<CGAL::Cartesian<double> >`.
for example `Search_traits_2<Simple_cartesian<double> >`.
Expects for the second template argument a model of the
concept `GeneralDistance`. If `Traits` is
`CGAL::Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `CGAL::Distance_adapter<Key,PointPropertyMap,CGAL::Euclidean_distance<Traits> >`,
and `CGAL::Euclidean_distance<Traits>` otherwise.
`Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`
the default type is `Distance_adapter<Key,PointPropertyMap,Euclidean_distance<Traits> >`,
and `Euclidean_distance<Traits>` otherwise.
The default type is
`CGAL::Euclidean_distance<Traits>`.
The default type is `Euclidean_distance<Traits>`.
Expects for third template argument a model of the concept `Splitter`.
The default type is `CGAL::Sliding_midpoint<Traits>`.
The default type is `Sliding_midpoint<Traits>`.
Expects for fourth template argument an implementation of the concept `SpatialTree`.
The default type is `CGAL::Kd_tree<Traits, Splitter, CGAL::Tag_true>`. The
template argument must be `CGAL::Tag_true` because orthogonal search needs extended
The default type is `Kd_tree<Traits, Splitter, Tag_true>`. The
template argument must be `Tag_true` because orthogonal search needs extended
kd tree nodes.
\sa `CGAL::K_neighbor_search<Traits, GeneralDistance, Splitter, SpatialTree>`

View File

@ -10,11 +10,8 @@ rectangle is called the associated rectangle. Provides a method to
split a container and a number of methods to support the
implementation of splitting rules.
### Parameters ###
Expects for the template argument an implementation for
`d`-dimensional points of the concept `SearchTraits`, for example
`CGAL::Cartesian_d<double>`.
\tparam Traits must be model of the concept `SearchTraits`, for example
`Simple_cartesian<double>`.
\sa `SearchTraits`
\sa `SpatialSeparator`

View File

@ -1,7 +1,7 @@
namespace CGAL {
/*!
\ingroup PkgSpatialSearchingD
\ingroup SearchTraitsClasses
The class `Search_traits` can be used as a template parameter of the kd tree
and the search classes. It is a mere wrapper for the geometric types needed

View File

@ -9,7 +9,7 @@ and the search classes.
### Parameters ###
Expects for the template argument a model of the concept `Kernel`,
for example `CGAL::Cartesian<double>` or `CGAL::Simple_cartesian<CGAL::Gmpq>`.
for example `Simple_cartesian<double>` or `Simple_cartesian<Gmpq>`.
\cgalModels `SearchTraits`
\cgalModels `RangeSearchTraits`
@ -46,13 +46,13 @@ Sphere type.
typedef Kernel::Circle_2 Sphere_d;
/*!
An iterator over the Cartesian coordinates.
An iterator over the %Cartesian coordinates.
*/
typedef Kernel::Cartesian_const_iterator_2 Cartesian_const_iterator_d;
/*!
A functor with
two function operators, which return the begin and past the end iterator for the Cartesian coordinates.
two function operators, which return the begin and past the end iterator for the %Cartesian coordinates.
The functor for begin has as argument a `Point_d`. The functor for the past the end iterator,
has as argument a `Point_d` and an `int`.
*/

View File

@ -9,7 +9,7 @@ and the search classes. `Kernel` must be a \cgal kernel.
### Parameters ###
Expects for the template argument a model of the concept `Kernel`,
for example `CGAL::Cartesian<double>` or `CGAL::Simple_cartesian<CGAL::Gmpq>`.
for example `Simple_cartesian<double>` or `Simple_cartesian<Gmpq>`.
\cgalModels `SearchTraits`
\cgalModels `RangeSearchTraits`
@ -46,14 +46,14 @@ Sphere type.
typedef Kernel::Sphere_3 Sphere_d;
/*!
An iterator over the Cartesian
An iterator over the %Cartesian
coordinates.
*/
typedef Kernel::Cartesian_const_iterator_3 Cartesian_const_iterator_d;
/*!
A functor with
two function operators, which return the begin and past the end iterator for the Cartesian coordinates.
two function operators, which return the begin and past the end iterator for the %Cartesian coordinates.
The functor for begin has as argument a `Point_d`. The functor for the past the end iterator,
has as argument a `Point_d` and an `int`.
*/

View File

@ -11,7 +11,7 @@ and the search classes. `Kernel` must be a \cgal kernel.
### Parameters ###
Expects for the template argument a model of the concept `Kernel_d`,
for example `CGAL::Cartesian_d<double>` or `CGAL::Homogeneous_d<CGAL::Gmpz>`.
for example `Cartesian_d<double>`.
\cgalModels `SearchTraits`
\cgalModels `RangeSearchTraits`
@ -49,14 +49,13 @@ Sphere type.
typedef Kernel::Sphere_d Sphere_d;
/*!
An iterator over the Cartesian
coordinates.
An iterator over the %Cartesian coordinates.
*/
typedef Kernel::Cartesian_const_iterator_d Cartesian_const_iterator;
/*!
A functor with
two function operators, which return the begin and past the end iterator for the Cartesian coordinates.
two function operators, which return the begin and past the end iterator for the %Cartesian coordinates.
The functor for begin has as argument a `Point_d`. The functor for the past the end iterator,
has as argument a `Point_d` and an `int`.
*/

View File

@ -17,11 +17,11 @@ the ratio of the resulting rectangles.
### Parameters ###
Expects for the first template argument a model of
the concept `::SearchTraits`,
for example `Cartesian_d<double>`.
the concept `SearchTraits`,
for example `Simple_cartesian<double>`.
Expects for the second template argument a model of the concept `SpatialSeparator`.
It has as default value the type, `CGAL::Plane_separator<Traits::FT>`.
It has as default value the type, `Plane_separator<Traits::FT>`.
\cgalModels `Splitter`

View File

@ -13,7 +13,7 @@ the transformed distance \f$ {\sigma_{i=1}^{i=d} \, w_i(r_i-q_i)^p}\f$ instead o
### Parameters ###
Expects for the template argument a model of the concept
`SearchTraits`, for example `CGAL::Search_traits_2<Kernel>`.
`SearchTraits`, for example `Search_traits_2<Kernel>`.
\cgalModels `OrthogonalDistance`

View File

@ -25,12 +25,12 @@ public:
/// @{
/*!
Iso box type. It is only needed for range search queries.
Iso box type, which is only needed for range search queries.
*/
typedef Hidden_type Iso_box_d;
/*!
Sphere type. It is only needed for range search queries.
Sphere type, which is only needed for range search queries.
*/
typedef Hidden_type Sphere_d;

View File

@ -42,7 +42,7 @@ typedef Hidden_type Cartesian_const_iterator_d;
/*!
Functor with operators to construct iterators on the
first and the past-the-end iterator for the %Cartesian coordinates of a point. This functor must
provides the type `result_type` that must be the same a `Cartesian_const_iterator_d`.
provide the type `result_type` that must be the same a `Cartesian_const_iterator_d`.
*/
typedef Hidden_type Construct_cartesian_const_iterator_d;

View File

@ -106,7 +106,7 @@ Returns a const handle to the root node of the tree.
Node_const_handle root() const;
/*!
returns a const
Returns a const
reference to the bounding box of the root node of the tree.
*/
const Kd_tree_rectangle<SearchTraits::FT>& bounding_box() const;