The class Weighted_Minkowski_distance<Traits> provides an implementation of the concept OrthogonalDistance, with a weighted Minkowski metric on d-dimensional points defined by lp(w)(r,q)= (Σi=1i=d wi(ri-qi)p)1/p for 0 < p <∞ and defined by l∞(w)(r,q)=max {wi |ri-qi| | 1 ≤ i ≤ d}. For the purpose of the distance computations it is more efficient to compute the transformed distance σi=1i=d wi(ri-qi)p 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 l2 metric for d-dimensional points.
| |
| |
| |
Constructor implementing the lpower(weights) metric. power ≤ 0 denotes the l∞(weights) metric.
The values in the iterator range [wb,we) are the weight.
|
|
| |
Returns dpower, where d denotes the distance between q and r. | ||
|
| |
Returns dpower, where d denotes the distance between the query item q and the point on the boundary of r closest to q. | ||
|
| |
Returns dpower, where d 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 dp for 0 < p <∞ . Returns d for p=∞ . |
|
| |
Returns d1/p for 0 < p <∞. Returns d for p=∞. |
OrthogonalDistance
CGAL::Euclidean_distance<Traits>