Class

CGAL::Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree>

Definition

The class Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree> implements incremental nearest and furthest neighbor searching on a tree.

#include <CGAL/Orthogonal_incremental_neighbor_search.h>

Parameters

Expects for the first template argument a model of the concept SearchTraits, for example CGAL::Search_traits_2<CGAL::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.

Expects for third template argument a model of the concept Splitter. The default type is CGAL::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 kd tree nodes.

Types

Traits::Point_d Point_d; Point type.

Traits::FT FT; Number type.

OrthogonalDistance Distance; Distance type.

OrthogonalDistance::Query_item Query_item; Query item.

std::pair<Point_d,FT> Point_with_transformed_distance; Pair of point and transformed distance.

Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree>::iterator
const input iterator with value type Point_with_transformed_distance for enumerating approximate neighbors.

SpatialTree Tree; The tree type.

Creation

Orthogonal_incremental_neighbor_search<Traits, OrthogonalDistance, Splitter, SpatialTree> s (
SpatialTree& tree,
Query_item query,
FT eps=FT(0.0),
bool search_nearest=true,
OrthogonalDistance d=OrthogonalDistance());
Constructor for incremental neighbor searching of the query item query in the points stored tree using a distance d and approximation factor eps.

Operations

iterator s.begin () const Returns a const iterator to the approximate nearest or furthest neighbor.

iterator s.end () const Returns the appropriate past-the-end const iterator.

std::ostream& s.statistics ( std::ostream& s) const
Inserts statistics of the search process into the output stream s.

See Also

CGAL::Incremental_neighbor_search<Traits, GeneralDistance, SpatialTree>