CGAL 5.1 - dD Spatial Searching
CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits > Class Template Reference

#include <CGAL/Search_traits_adapter.h>

Inherits BaseTraits.

Definition

template<typename Key, typename PointPropertyMap, typename BaseTraits>
class CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >

The class Search_traits_adapter can be used as a template parameter of the kd tree and the search classes. When using this traits class in a nearest neighbor search algorithm, the class Distance_adapter<Key,PointPropertyMap,Base_distance> must be used as distance.

Template Parameters
Keyis a type that is associated to a point of type Base_distance::Point_d.
PointPropertyMapis a model of LvaluePropertyMap with Key as key_type and Base_distance::Point_d as value_type.
BaseTraitsis a model of either SearchTraits or RangeSearchTraits.
Is Model Of:

SearchTraits if BaseTraits is a model of SearchTraits.

RangeSearchTraits if BaseTraits is a model of RangeSearchTraits.

See also
Distance_adapter<Key,PointPropertyMap,Base_distance>
Search_traits_2<Kernel>
Search_traits_3<Kernel>
Search_traits_d<Kernel>
Search_traits<Point,CartesianConstIterator,ConstructCartesianConstIterator>
Examples
Spatial_searching/searching_polyhedron_vertices.cpp, Spatial_searching/searching_surface_mesh_vertices.cpp, Spatial_searching/searching_with_point_with_info.cpp, Spatial_searching/searching_with_point_with_info_inplace.cpp, and Spatial_searching/searching_with_point_with_info_pmap.cpp.

Types

typedef BaseTraits::Dimension Dimension
 
typedef Key Point_d
 
typedef BaseTraits::FT FT
 
typedef BaseTraits::Cartesian_const_iterator_d Cartesian_const_iterator_d
 
typedef BaseTraits Base
 

Creation

 Search_traits_adapter (const PointPropertyMap &ppmap=PointPropertyMap(), const BaseTraits &base=BaseTraits())
 Constructor initializing the class to base and setting the point property map of the class to ppmap. More...
 

Operations

const PointPropertyMap & point_property_map () const
 Returns the point property map. More...
 

Member Typedef Documentation

◆ Base

template<typename Key , typename PointPropertyMap , typename BaseTraits >
typedef BaseTraits CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::Base

◆ Cartesian_const_iterator_d

template<typename Key , typename PointPropertyMap , typename BaseTraits >
typedef BaseTraits::Cartesian_const_iterator_d CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::Cartesian_const_iterator_d

◆ Dimension

template<typename Key , typename PointPropertyMap , typename BaseTraits >
typedef BaseTraits::Dimension CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::Dimension

◆ FT

template<typename Key , typename PointPropertyMap , typename BaseTraits >
typedef BaseTraits::FT CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::FT

◆ Point_d

template<typename Key , typename PointPropertyMap , typename BaseTraits >
typedef Key CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::Point_d

Constructor & Destructor Documentation

◆ Search_traits_adapter()

template<typename Key , typename PointPropertyMap , typename BaseTraits >
CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::Search_traits_adapter ( const PointPropertyMap &  ppmap = PointPropertyMap(),
const BaseTraits &  base = BaseTraits() 
)

Constructor initializing the class to base and setting the point property map of the class to ppmap.

Member Function Documentation

◆ point_property_map()

template<typename Key , typename PointPropertyMap , typename BaseTraits >
const PointPropertyMap& CGAL::Search_traits_adapter< Key, PointPropertyMap, BaseTraits >::point_property_map ( ) const

Returns the point property map.