The class Weighted_Minkowski_distance<Traits> provides an implementation of the concept OrthogonalDistance, with a weighted Minkowski metric on -dimensional points defined by for and defined by . For the purpose of the distance computations it is more efficient to compute the transformed distance instead of the actual distance.
#include <CGAL/Weighted_Minkowski_distance.h>
Expects for the template argument a model of the concept SearchTraits, for example CGAL::Search_traits_2<Kernel>.
|
| Number type. |
|
| Point type. |
| |||
Constructor implementing metric for -dimensional points.
| |||
| |||
| |||
Constructor implementing the metric. denotes the metric.
The values in the iterator range [wb,we) are the weight.
|
|
| |||
Returns , where denotes the distance between q and r. | ||||
|
| |||
Returns , where denotes the distance between the query item q and the point on the boundary of r closest to q. | ||||
|
| |||
Returns , where denotes the distance between the query item q and the point on the boundary of r farthest to q. | ||||
|
| |||
Updates dist incrementally and returns the updated distance. | ||||
|
| |||
Returns for . Returns for . | ||||
|
| |||
Returns for . Returns for . |
OrthogonalDistance
CGAL::Euclidean_distance<Traits>