GeneralDistance

Definition

Requirements of a distance class defining a distance between a query item denoting a spatial object and a point. To optimize distance computations transformed distances are used, e.g., for a Euclidean distance the transformed distance is the squared Euclidean distance.

Has Models

CGAL::Manhattan_distance_rectangle_point<Traits, IsoBox>
CGAL::Euclidean_distance_sphere_point<Traits, Sphere>.

Types

GeneralDistance::FT
Number type.


GeneralDistance::Point_d
Point type.


GeneralDistance::Query_item
Query item type.

Operations

FT gd.transformed_distance ( Query_item q, Point_d r)
Returns the transformed distance between q and r.

FT
gd.min_distance_to_rectangle ( Query_item q,
Kd_tree_rectangle<FT> r)
Returns the transformed distance between q and the point on the boundary of r closest to q.

FT
gd.max_distance_to_rectangle ( Query_item q,
Kd_tree_rectangle<FT> r)
Returns the transformed distance between q and the point on the boundary of r furthest to q.

FT gd.transformed_distance ( FT d)
Returns the transformed distance.

FT gd.inverse_of_transformed_distance ( FT d)
Returns the inverse of the transformed distance.