KNNHeap
for building kNN results.See: Description
Interface | Description |
---|---|
DistanceDBIDResult<D extends Distance<D>> |
Collection of objects and their distances.
|
DistanceDBIDResultIter<D extends Distance<D>> |
Iterator over distance-based query results.
|
DoubleDistanceDBIDResultIter |
Iterator for double valued distance-based query results.
|
KNNHeap<D extends Distance<D>> |
Interface for kNN heaps.
|
KNNResult<D extends Distance<D>> |
Interface for kNN results.
|
ModifiableDistanceDBIDResult<D extends Distance<D>> |
Modifiable API for Distance-DBID results
|
Class | Description |
---|---|
AbstractKNNHeap<P extends DistanceDBIDPair<D>,D extends Distance<D>> |
Heap used for KNN management.
|
AbstractKNNHeap.Comp |
Comparator to use.
|
DistanceDBIDResultUtil |
Utility classes for distance DBID results.
|
DoubleDistanceDBIDList |
Default class to keep a list of distance-object pairs.
|
DoubleDistanceKNNHeap |
Heap for collecting double-valued KNN instances.
|
DoubleDistanceKNNHeap.Comp |
Comparator to use.
|
DoubleDistanceKNNList |
Finalized KNN List.
|
GenericDistanceDBIDList<D extends Distance<D>> |
Default class to keep a list of distance-object pairs.
|
GenericKNNHeap<D extends Distance<D>> |
Heap for collecting kNN candiates with arbitrary distance types.
|
GenericKNNList<D extends Distance<D>> |
Finalized KNN List.
|
KNNUtil |
Helper classes for kNN results.
|
KNNUtil.DistanceItr<D extends Distance<D>> |
Proxy iterator for accessing DBIDs.
|
KNNUtil.DistanceView<D extends Distance<D>> |
A view on the Distances of the result.
|
KNNUtil.KNNSubList<D extends Distance<D>> |
Sublist of an existing result to contain only the first k elements.
|
Classes for building and storing the results of distance-based queries
The classes in this package essentially form three groups:
KNNHeap
for building kNN results.
It allows adding new candidates (and loses old candidates automatically), but it is not iterable.KNNUtil.newHeap(de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction<?, D>, int)
!
KNNResult
is the final kNN result
obtained by serializing a heap via KNNHeap.toKNNList()
.
It is iterable and totally ordered, but can no longer be modified (unless you call
KNNUtil.newHeap(de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction<?, D>, int)
!GenericDistanceDBIDList
and the optimized
counterpart DoubleDistanceDBIDList
, are
modifiable, but not necessarily sorted lists of neighbors, useful for example for range queries.Try to choose the most appropriate one! Heaps are optimized for updates but bad for reading, KNNResult is optimized for reading but unmodifiable, and the lists are easy to modify, but less efficient than heaps.