Package elki.index
Interface KNNIndex<O>
-
- Type Parameters:
O- Object type
- All Superinterfaces:
Index
- All Known Subinterfaces:
DistancePriorityIndex<O>
- All Known Implementing Classes:
AbstractMaterializeKNNPreprocessor,CachedDoubleDistanceKNNPreprocessor,CoverTree,DeLiCluTreeIndex,FlatRStarTreeIndex,GNAT,InMemoryIDistanceIndex,InMemoryInvertedIndex,InMemoryLSHIndex.Instance,KNNJoinMaterializeKNNPreprocessor,LAESA,LatLngAsECEFIndex,LngLatAsECEFIndex,MaterializeKNNAndRKNNPreprocessor,MaterializeKNNPreprocessor,MemoryKDTree,MetricalIndexApproximationMaterializeKNNPreprocessor,MinimalisticMemoryKDTree,MkAppTreeIndex,MkCoPTreeIndex,MkMaxTreeIndex,MkTabTreeIndex,MTreeIndex,NaiveProjectedKNNPreprocessor,NNDescent,PartialVAFile,PartitionApproximationMaterializeKNNPreprocessor,PrecomputedDistanceMatrix,ProjectedIndex,RandomSampleKNNPreprocessor,RdKNNTree,RStarTreeIndex,SimplifiedCoverTree,SmallMemoryKDTree,SpacefillingKNNPreprocessor,SpacefillingMaterializeKNNPreprocessor,SpatialApproximationMaterializeKNNPreprocessor,VAFile,VPTree
public interface KNNIndex<O> extends Index
Index with support for kNN queries.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default KNNSearcher<DBIDRef>kNNByDBID(DistanceQuery<O> distanceQuery, int maxk, int flags)Get a KNN query object for the given distance query and k.KNNSearcher<O>kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)Get a KNN query object for the given distance query and k.-
Methods inherited from interface elki.index.Index
initialize, logStatistics
-
-
-
-
Method Detail
-
kNNByObject
KNNSearcher<O> kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Get a KNN query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Parameters:
distanceQuery- Distance querymaxk- Maximum value of kflags- Hints for the optimizer- Returns:
- KNN Query object or
null
-
kNNByDBID
default KNNSearcher<DBIDRef> kNNByDBID(DistanceQuery<O> distanceQuery, int maxk, int flags)
Get a KNN query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Parameters:
distanceQuery- Distance querymaxk- Maximum value of kflags- Hints for the optimizer- Returns:
- KNN Query object or
null
-
-