\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.2 - dD Spatial Searching
CGAL::Incremental_neighbor_search< Traits, GeneralDistance, Splitter, SpatialTree > Class Template Reference

#include <CGAL/Incremental_neighbor_search.h>

Definition

The class Incremental_neighbor_search implements incremental nearest and furthest neighbor searching on a tree.

The tree may have extended or unextended nodes.

Template Parameters
Traitsmust be a model of the concept SearchTraits, for example Search_traits_2<Simple_cartesian<double> >.
GeneralDistancemust be a model of the concept GeneralDistance. 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.
Splittermust be a model of the concept Splitter. The default type is Sliding_midpoint<Traits>.
SpatialTreemust be a model of the concept SpatialTree. The default type is Kd_tree<Traits,Splitter,Tag_false>. The template argument Tag_false makes that the tree is built with unextended nodes.
See also
CGAL::Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree>

Types

typedef Traits::Point_d Point_d
 Point type.
 
typedef Traits::NT NT
 Number type.
 
typedef GeneralDistance Distance
 Distance type.
 
typedef std::pair< Point_d, NTPoint_with_transformed_distance
 Pair of point and transformed distance.
 
typedef unspecified_type iterator
 const input iterator with value type Point_with_transformed_distance for enumerating approximate neighbors.
 
GeneralDistance::Query_item Query_item
 Query item type.
 
SpatialTree Tree
 The tree type.
 

Creation

 Incremental_neighbor_search (Tree &tree, QueryItem q, NT eps=NT(0.0), bool search_nearest=true, GeneralDistance d=GeneralDistance())
 Constructor for incremental neighbor searching of the query item q in the points stored tree using a distance d and approximation factor eps.
 

Operations

iterator begin () const
 Returns a const iterator to the approximate nearest or furthest neighbor.
 
iterator end () const
 Returns the appropriate past-the-end const iterator.
 
std::ostream & statistics (std::ostream &s)
 Inserts statistics of the search process into the output stream s.