L
- Label type.public class ArraySpatialIndex<L> extends Object implements SpatialIndex<L>
SpatialIndex
. Asymptotic runtime complexity of finding k
closest
elements is O(n*log(k))
, but it doesn't degrade on high dimensional data.Constructor and Description |
---|
ArraySpatialIndex(List<LabeledVector<L>> data,
DistanceMeasure distanceMeasure)
Construct a new array 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 ArraySpatialIndex(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