A DistanceMeasure
is used in nearest neighbour search,
in order to allow different ways points and children are
favoured or filtered during the search.
For simplicity and performance, the measures, although
they could be generalized as Ordered
, are given as
Long
values. Only comparisons are performed with
the results, therefore some optimizations may be made,
for example the euclidean
measure omits taking
the square root of the distances, while still preserving
the ordering between the possible results.
- Companion
- object
Value members
Abstract methods
Calculates the distance between two points.
Calculates the distance between two points.
- Value Params
- a
the input query point
- b
a point in the octree
Calculates the maximum distance between a point and
any possible point of a given hyper-cube. In the euclidean
case, this is the distance to the hyper-cube b
's corner that
is furthest to the point a
, no matter whether a
is contained in b
or not.
Calculates the maximum distance between a point and
any possible point of a given hyper-cube. In the euclidean
case, this is the distance to the hyper-cube b
's corner that
is furthest to the point a
, no matter whether a
is contained in b
or not.
A value which will never be exceeded by the measure.
A value which will never be exceeded by the measure.
Calculates the minimum distance between a point and
any possible point of a given hyper-cube. In the euclidean
case, this is the distance to the hyper-cube b
's corner that
is closest to the point a
, if a
lies outside of b
,
or zero, if a
lies within b
.
Calculates the minimum distance between a point and
any possible point of a given hyper-cube. In the euclidean
case, this is the distance to the hyper-cube b
's corner that
is closest to the point a
, if a
lies outside of b
,
or zero, if a
lies within b
.