L
- Label type.public class BallTreeSpatialIndex<L> extends Object implements SpatialIndex<L>
SpatialIndex
. Asymptotic runtime complexity of finding k
closest
elements is O(log(n)*k)
, but it degrades on high dimensional data.Constructor and Description |
---|
BallTreeSpatialIndex(List<LabeledVector<L>> data,
DistanceMeasure distanceMeasure)
Constructs a new instance of Ball tree spatial index.
|
Modifier and Type | Method and Description |
---|---|
List<LabeledVector<L>> |
findKClosest(int k,
Vector pnt)
Finds
k closest elements to the specified point. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public BallTreeSpatialIndex(List<LabeledVector<L>> data, DistanceMeasure distanceMeasure)
data
- Data.distanceMeasure
- Distance measure.public List<LabeledVector<L>> findKClosest(int k, Vector pnt)
k
closest elements to the specified point.findKClosest
in interface SpatialIndex<L>
k
- Number of elements to be returned.pnt
- Point to be used to calculate distance to other points.k
closest elements to the specified point.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024