OrthogonalDistance

Definition

Requirements of an orthogonal distance class supporting incremental distance updates. To optimize distance computations transformed distances are used. E.g., for an Euclidean distance the transformed distance is the squared Euclidean distance.

Refines

GeneralDistance

Has Models

CGAL::Euclidean_distance<Traits>,
CGAL::Weighted_Minkowski_distance<Traits>

Types

OrthogonalDistance::FT
Number type.


OrthogonalDistance::Point_d
Point type.


OrthogonalDistance::Query_item
Query item type.

Creation

OrthogonalDistance od ( int d);
Constructor implementing distance for d-dimensional points.

Operations

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

FT od.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 od.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 farthest to q.

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

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

FT od.new_distance ( FT dist, FT old_off, FT new_off, int cutting_dimension)
Updates dist incrementally and returns the updated distance.