The class Euclidean_distance<Traits> provides an implementation of the concept OrthogonalDistance, with the Euclidean distance ( metric). To optimize distance computations squared distances are used.
#include <CGAL/Euclidean_distance.h>
Expects for the first template argument a model of the concept SearchTraits, for example CGAL::Search_traits_2<CGAL::Cartesian<double> >.
OrthogonalDistance
|
| Number type. |
|
| Point type. |
|
| Query item type. |
| |
Default constructor.
|
|
| |||
Returns the squared Euclidean distance between q and p. | ||||
|
| |||
Returns the squared Euclidean distance between q and the point on the boundary of r closest to q. | ||||
|
| |||
Returns the squared Euclidean distance, where denotes the distance between q and the point on the boundary of r farthest to q. | ||||
|
| |||
Updates the squared dist incrementally and returns the updated squared distance. | ||||
|
| |||
Returns . | ||||
|
| |||
Returns . |
OrthogonalDistance
CGAL::Weighted_Minkowski_distance<Traits>.