Class

CGAL::Distance_for_point_adapter<Key,PointPropertyMap,Base_distance>

Definition

A class that uses a point property map to adapt a distance class to work on a key as point type. When using Search_traits_adapter<Key,PointPropertyMap,BaseTraits> in a nearest neighbor search algorithm, this class must be used as distance.

#include <CGAL/Search_traits_adapter.h>

Parameters

Key is a type that is associated to a point of type Base_distance::Point_d.
PointPropertyMap is a model of boost::ReadablePropertyMap with Key as key_type and Base_distance::Point_d as value_type.
Base_distance is a model of either GeneralDistance or OrthogonalDistance.

Inherits From

Base_distance

Is Model for the Concepts

GeneralDistance if Base_distance is a model of GeneralDistance.
OrthogonalDistance if Base_distance is a model of OrthogonalDistance.

Types

Base_distance::FT FT;

Key Point_d;

Base_distance::Query_item Query_item;

Creation

Distance_for_point_adapter<Key,PointPropertyMap,Base_distance> d ( PointPropertyMap ppmap=PointPropertyMap(),
Base_distance base=Base_distance());
Constructor initializing the class to base and setting the point property map of the class to ppmap.

Operations

PointPropertyMap d.point_property_map () const Returns the point property map.

See Also

Search_traits_adapter<Key,PointPropertyMap,BaseTraits>