|
CGAL 4.7 - dD Spatial Searching
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
The class Orthogonal_k_neighbor_search implements approximatek-nearest and k-furthest neighbor searching on a tree using an orthogonal distance class.
| Traits | must be a model of the concept SearchTraits, for example Search_traits_2<Simple_cartesian<double> >. |
| OrthogonalDistance | must be a model of the concept OrthogonalDistance. If Traits is Search_traits_adapter<Key,PointPropertyMap,BaseTraits> the default type is Distance_adapter<Key,PointPropertyMap,Euclidean_distance<BaseTraits> >, and Euclidean_distance<Traits> otherwise. |
The default type is Euclidean_distance<Traits>.
| Splitter | must be a model of the concept Splitter. The default type is Sliding_midpoint<Traits>. |
| SpatialTree | must be a model of the concept SpatialTree. 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. |
CGAL::K_neighbor_search<Traits, GeneralDistance, Splitter, SpatialTree> Types | |
| typedef Traits::Point_d | Point_d |
| Point type. More... | |
| typedef Traits::FT | FT |
| Number type. More... | |
| typedef OrthogonalDistance | Distance |
| Distance type. More... | |
| typedef GeneralDistance::Query_item | Query_item |
| Query item. More... | |
| typedef std::pair< Point_d, FT > | Point_with_transformed_distance |
| Pair of point and transformed distance. More... | |
| typedef unspecified_type | iterator |
Bidirectional const iterator with value type Point_with_transformed_distance for enumerating approximate neighbors. More... | |
| typedef SpatialTree | Tree |
| The tree type. More... | |
Operations | |
| Orthogonal_k_neighbor_search (SpatialTree tree, Query_item query, unsigned int k=1, FT eps=FT(0.0), bool search_nearest=true, OrthogonalDistance d=OrthogonalDistance(), bool sorted=true) | |
Constructor for searching approximately k neighbors of the query item query in the points stored in tree using distance d and approximation factor eps. More... | |
| iterator | begin () const |
| Returns a const iterator to the approximate nearest or furthest neighbor. More... | |
| iterator | end () const |
| Returns the appropriate past-the-end const iterator. More... | |
| std::ostream & | statistics (std::ostream &s) |
Inserts statistics of the search process into the output stream s. More... | |
| typedef OrthogonalDistance CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Distance |
Distance type.
| typedef Traits::FT CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::FT |
Number type.
| typedef unspecified_type CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::iterator |
Bidirectional const iterator with value type Point_with_transformed_distance for enumerating approximate neighbors.
| typedef Traits::Point_d CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Point_d |
Point type.
| typedef std::pair<Point_d,FT> CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Point_with_transformed_distance |
Pair of point and transformed distance.
| typedef GeneralDistance::Query_item CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Query_item |
Query item.
| typedef SpatialTree CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Tree |
The tree type.
| CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::Orthogonal_k_neighbor_search | ( | SpatialTree | tree, |
| Query_item | query, | ||
| unsigned int | k = 1, |
||
| FT | eps = FT(0.0), |
||
| bool | search_nearest = true, |
||
| OrthogonalDistance | d = OrthogonalDistance(), |
||
| bool | sorted = true |
||
| ) |
Constructor for searching approximately k neighbors of the query item query in the points stored in tree using distance d and approximation factor eps.
sorted indicates if the computed sequence of k-nearest neighbors needs to be sorted.
| iterator CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::begin | ( | ) | const |
Returns a const iterator to the approximate nearest or furthest neighbor.
| iterator CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::end | ( | ) | const |
Returns the appropriate past-the-end const iterator.
| std::ostream& CGAL::Orthogonal_k_neighbor_search< Traits, OrthogonalDistance, Splitter, SpatialTree >::statistics | ( | std::ostream & | s | ) |
Inserts statistics of the search process into the output stream s.