Package com.github.micycle1.geoblitz
Interface HPRtreeX.DistanceToItem<T>
- Type Parameters:
T- item type stored in the tree
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface used to compute the distance between a query coordinate
and an item stored in the tree.
-
Method Summary
-
Method Details
-
distance
Computes the scalar distance from the query pointqto the supplieditem.Implementations should return a non-negative value. The tree uses these distances for ranking candidates during nearest-neighbor search; for best performance the function should be inexpensive to compute.
- Parameters:
q- the query coordinateitem- the item whose distance toqshould be computed- Returns:
- the distance from
qtoitem(must be >= 0)
-