Updated the documentation of Fuzzy Query Items

This commit is contained in:
Mael Rouxel-Labbé 2017-01-09 17:43:53 +01:00
parent affece6748
commit e64f271451
3 changed files with 74 additions and 53 deletions

View File

@ -3,11 +3,15 @@ namespace CGAL {
/*!
\ingroup RangeQueryItemClasses
The class `Fuzzy_iso_box` implements fuzzy `d`-dimensional iso boxes. A
fuzzy iso box with fuzziness value \f$ \epsilon\f$ has as outer
approximation a box dilated, and as inner approximation a box eroded
by a `d`-dim square with side length \f$ \epsilon\f$.
The class `Fuzzy_iso_box` implements fuzzy `d`-dimensional iso boxes. A fuzzy iso
box with fuzziness value \f$ \epsilon\f$ has as inner and outer approximations
a box respectively eroded and dilated by a `d`-dim square with side length \f$ \epsilon\f$.
\attention Points in the interior of the inner approximation are always reported and points
that are not in the closure of the outer approximation are never reported. Other
points may or may not be reported. Subsequently, points on the boundary of the
inner and outer approximations may or may not be reported. Specifically when \f$ \epsilon = 0\f$,
points on the boundary of the box may or may not be reported.
\tparam Traits must be a model of the concept
`SearchTraits`, for example `CGAL::Search_traits_2<CGAL::Simple_cartesian<double> >`.
@ -45,14 +49,15 @@ typedef Traits::FT FT;
/// @{
/*!
Constructs a fuzzy iso box
specified by the minimal iso box containing `p` and `q` and fuzziness value `epsilon`.
\pre `p` must be lexicographically smaller than `q`.
*/
Fuzzy_iso_box(Point_d p, Point_d q, FT epsilon=FT(0),Traits t=Traits());
Construct a fuzzy iso box
specified by the minimal iso box containing `p` and `q` and fuzziness value `epsilon`.
\pre `p` must be lexicographically smaller than `q`.
*/
Fuzzy_iso_box(Point_d p, Point_d q, FT epsilon=FT(0),Traits t=Traits());
/*!
Constructs a fuzzy iso box specified by the minimal iso box containing `p` and `q` and fuzziness value `epsilon`.
Construct a fuzzy iso box specified by the minimal iso box containing `p` and `q` and fuzziness value `epsilon`.
\attention Only available in case `Traits` is
`Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`.
@ -67,20 +72,20 @@ Fuzzy_iso_box(Traits::Base::Point_d p, Traits::Base::Point_d q, FT epsilon=FT(0)
/// @{
/*!
test whether the fuzzy iso box contains `p`.
*/
bool contains(Point_d p) const;
Test whether the fuzzy iso box contains `p`.
*/
bool contains(Point_d p) const;
/*!
test whether the inner box intersects the rectangle
associated with a node of a tree.
*/
bool inner_range_intersects(const Kd_tree_rectangle<FT,D>& rectangle) const;
Test whether the inner box intersects the rectangle
associated with a node of a tree.
*/
bool inner_range_intersects(const Kd_tree_rectangle<FT,D>& rectangle) const;
/*!
test whether the outer box encloses the rectangle associated with a node of a tree.
*/
bool outer_range_contains(const Kd_tree_rectangle<FT,D>& rectangle) const;
Test whether the outer box encloses the rectangle associated with a node of a tree.
*/
bool outer_range_contains(const Kd_tree_rectangle<FT,D>& rectangle) const;
/// @}

View File

@ -3,14 +3,22 @@ namespace CGAL {
/*!
\ingroup RangeQueryItemClasses
The class `Fuzzy_sphere` implements fuzzy `d`-dimensional spheres.
A fuzzy sphere with radius \f$ r\f$ and fuzziness value \f$ \epsilon\f$ has
as outer approximation a sphere with radius \f$ r+\epsilon\f$ and
as inner approximation a sphere with radius \f$ r-\epsilon\f$.
The class `Fuzzy_sphere` implements fuzzy `d`-dimensional spheres.
A fuzzy sphere with radius \f$ r\f$ and fuzziness value \f$ \epsilon\f$ has
as inner approximation a sphere with radius \f$ r-\epsilon\f$ and
as outer approximation a sphere with radius \f$ r+\epsilon\f$.
\attention The fuzziness of a `Fuzzy_sphere` is specified by a parameter \f$ \epsilon\f$
denoting a maximal allowed distance to the boundary of a sphere.
If the distance to the boundary is at least \f$ \epsilon\f$, points inside the
object are always reported and points outside the sphere are never reported.
Points within distance \f$ \epsilon\f$ to the boundary may be or may be not reported.
Subsequently, points on the inner and outer spheres may or may not be reported
by a search query. Specifically when \f$ \epsilon = 0\f$, points on the sphere
of radius \f$ r\f$ may or may not be reported.
\tparam Traits must be a model of the concept
`SearchTraits`, for example `CGAL::Cartesian_d<double>`.
\tparam Traits must be a model of the concept
`SearchTraits`, for example `CGAL::Cartesian_d<double>`.
\cgalModels `FuzzyQueryItem`
@ -46,13 +54,13 @@ typedef Traits::FT FT;
/// @{
/*!
Constructs a fuzzy sphere
centered at `center` with radius `radius` and fuzziness value `epsilon`.
*/
Fuzzy_sphere(Point_d center, FT radius, FT epsilon=FT(0),Traits t=Traits());
Construct a fuzzy sphere
centered at `center` with radius `radius` and fuzziness value `epsilon`.
*/
Fuzzy_sphere(Point_d center, FT radius, FT epsilon=FT(0),Traits t=Traits());
/*!
Constructs a fuzzy sphere centered at `center` with radius `radius` and fuzziness value `epsilon`.
Construct a fuzzy sphere centered at `center` with radius `radius` and fuzziness value `epsilon`.
\attention Only available in case `Traits` is `Search_traits_adapter<Key,PointPropertyMap,BaseTraits>`.
*/
Fuzzy_sphere(Traits::Base::Point_d center, FT radius, FT epsilon=FT(0), Traits t=Traits());
@ -63,20 +71,29 @@ Fuzzy_sphere(Traits::Base::Point_d center, FT radius, FT epsilon=FT(0), Traits t
/// @{
/*!
test whether the fuzzy sphere contains `p`.
*/
bool contains(const Point_d& p) const;
Test whether the fuzzy sphere contains `p`.
That is, whether the distance between the center of the fuzzy sphere and `p` is
less than \f$ r\f$.
*/
bool contains(const Point_d& p) const;
/*!
test whether the inner sphere intersects the rectangle
associated with a node of a tree.
*/
bool inner_range_intersects(const Kd_tree_rectangle<FT,D>& rectangle) const;
Test whether the inner sphere intersects the rectangle
associated with a node of a tree.
That is, whether the minimal distance between the center of the fuzzy sphere and
`rectangle` is less than \f$ r-\epsilon\f$.
*/
bool inner_range_intersects(const Kd_tree_rectangle<FT,D>& rectangle) const;
/*!
test whether the outer sphere encloses the rectangle associated with a node of a tree.
*/
bool outer_range_contains(const Kd_tree_rectangle<FT,D>& rectangle) const;
Test whether the outer sphere encloses the rectangle associated with a node of a tree.
That is, whether the minimal distance between the center of the fuzzy sphere and
`rectangle` is less than \f$ r+\epsilon\f$.
*/
bool outer_range_contains(const Kd_tree_rectangle<FT,D>& rectangle) const;
/// @}

View File

@ -148,23 +148,22 @@ GeneralDistance, Splitter, SpatialTree>`
\subsection Spatial_searchingRangeSearching Range Searching
<I>Exact range searching</I> and <I>approximate range searching</I> is
<I>Exact range searching</I> and <I>approximate range searching</I> are
supported using exact or fuzzy `d`-dimensional objects enclosing a
region. The fuzziness of the query object is specified by a parameter
\f$ \epsilon\f$ denoting a maximal allowed distance to the boundary of a
query object. If the distance to the boundary is at least
\f$ \epsilon\f$, points inside the object are always reported and points
outside the object are never reported. Points within distance
\f$ \epsilon\f$ to the boundary may be or may be not reported. For exact
range searching the fuzziness parameter \f$ \epsilon\f$ is set to zero.
\f$ \epsilon\f$ used to define inner and outer approximations of the query object.
Points in the interior of the inner approximation are always reported and points
that are not in the closure of the outer approximation are never reported. Other
points may or may not be reported. For exact range searching,
the fuzziness parameter \f$ \epsilon\f$ is set to zero.
The class `Kd_tree` implements range searching in the method `search`,
which is a template method with an output iterator and a model of the
concept `FuzzyQueryItem` as `Fuzzy_iso_box`
or `Fuzzy_sphere`.
For range searching of large data sets the user may set the parameter `bucket_size`
used in building the `kd` tree to a large value (e.g. 100),
because in general the query time will be less then using the default value.
concept `FuzzyQueryItem` as `Fuzzy_iso_box`
or `Fuzzy_sphere`.
For range searching of large data sets, the user may set the parameter `bucket_size`
used in building the `kd` tree to a large value (e.g. 100),
because in general the query time will be less than using the default value.
\section Spatial_SearchingSplitting_rule_section Splitting Rules