CGAL 6.1 - dD Spatial Searching
Loading...
Searching...
No Matches
OrthogonalDistance Class Reference

#include <Concepts/OrthogonalDistance.h>

Definition

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

Refines
GeneralDistance
Has models
CGAL::Euclidean_distance<Traits>
CGAL::Weighted_Minkowski_distance<Traits>

Types

typedef unspecified_type D
 Dimension Tag.
 
typedef unspecified_type FT
 Number type.
 
typedef unspecified_type Point_d
 Point type.
 
typedef unspecified_type Query_item
 Query item type.
 

Creation

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

Operations

FT transformed_distance (Query_item q, Point_d r) const
 Returns the transformed distance between q and r.
 
FT min_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r) const
 Returns the transformed distance between q and the point on the boundary of r closest to q.
 
FT min_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r, std::vector< FT > &dists)
 Returns the transformed distance between q and the point on the boundary of r closest to q.
 
FT max_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r) const
 Returns the transformed distance between q and the point on the boundary of r farthest to q.
 
FT max_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r, std::vector< FT > &dists)
 Returns the transformed distance between q and the point on the boundary of r farthest to q.
 
FT transformed_distance (FT d) const
 Returns the transformed distance.
 
FT inverse_of_transformed_distance (FT d) const
 Returns the inverse of the transformed distance.
 
FT new_distance (FT dist, FT old_off, FT new_off, int cutting_dimension) const
 Updates dist incrementally and returns the updated distance.
 

Member Typedef Documentation

◆ D

typedef unspecified_type OrthogonalDistance::D

Dimension Tag.

◆ FT

typedef unspecified_type OrthogonalDistance::FT

Number type.

◆ Point_d

typedef unspecified_type OrthogonalDistance::Point_d

Point type.

◆ Query_item

typedef unspecified_type OrthogonalDistance::Query_item

Query item type.

Constructor & Destructor Documentation

◆ OrthogonalDistance()

OrthogonalDistance::OrthogonalDistance ( )

Constructor implementing distance for d-dimensional points.

Member Function Documentation

◆ inverse_of_transformed_distance()

FT OrthogonalDistance::inverse_of_transformed_distance ( FT  d) const

Returns the inverse of the transformed distance.

◆ max_distance_to_rectangle() [1/2]

FT OrthogonalDistance::max_distance_to_rectangle ( Query_item  q,
Kd_tree_rectangle< FT, D r 
) const

Returns the transformed distance between q and the point on the boundary of r farthest to q.

◆ max_distance_to_rectangle() [2/2]

FT OrthogonalDistance::max_distance_to_rectangle ( Query_item  q,
Kd_tree_rectangle< FT, D r,
std::vector< FT > &  dists 
)

Returns the transformed distance between q and the point on the boundary of r farthest to q.

The vector dists has the size of the dimension of the data points and is filled with the distance in each dimension.

◆ min_distance_to_rectangle() [1/2]

FT OrthogonalDistance::min_distance_to_rectangle ( Query_item  q,
Kd_tree_rectangle< FT, D r 
) const

Returns the transformed distance between q and the point on the boundary of r closest to q.

◆ min_distance_to_rectangle() [2/2]

FT OrthogonalDistance::min_distance_to_rectangle ( Query_item  q,
Kd_tree_rectangle< FT, D r,
std::vector< FT > &  dists 
)

Returns the transformed distance between q and the point on the boundary of r closest to q.

The vector dists has the size of the dimension of the data points and is filled with the distance in each dimension.

◆ new_distance()

FT OrthogonalDistance::new_distance ( FT  dist,
FT  old_off,
FT  new_off,
int  cutting_dimension 
) const

Updates dist incrementally and returns the updated distance.

◆ transformed_distance() [1/2]

FT OrthogonalDistance::transformed_distance ( FT  d) const

Returns the transformed distance.

◆ transformed_distance() [2/2]

FT OrthogonalDistance::transformed_distance ( Query_item  q,
Point_d  r 
) const

Returns the transformed distance between q and r.