O
- the type of DatabaseObject to be stored in the metrical indexD
- the type of Distance used in the metrical indexN
- the type of MetricalNode used in the metrical indexE
- the type of MetricalEntry used in the metrical indexpublic abstract class AbstractMkTree<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>> extends AbstractMTree<O,D,N,E>
Modifier and Type | Field and Description |
---|---|
protected KNNQuery<O,D> |
knnq
Internal class for performing knn queries
|
distanceFunction, distanceQuery, EXTRA_INTEGRITY_CHECKS
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
Constructor and Description |
---|
AbstractMkTree(PageFile<N> pagefile,
DistanceQuery<O,D> distanceQuery,
DistanceFunction<O,D> distanceFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Map<DBID,KNNResult<D>> |
batchNN(N node,
DBIDs ids,
int kmax)
Deprecated.
Change to use by-object NN lookups instead.
|
abstract DistanceDBIDResult<D> |
reverseKNNQuery(DBIDRef id,
int k)
Performs a reverse k-nearest neighbor query for the given object ID.
|
createEmptyRoot, createNewDirectoryEntry, distance, getDistanceFactory, getDistanceFunction, getDistanceQuery, getHeight, getLeaves, getSortedEntries, getSortedEntries, insert, insertAll, toString
createHeader, createNewDirectoryNode, createNewLeafNode, createRootEntry, deleteNode, getFile, getLogger, getNode, getNode, getPageFileStatistics, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initialize, initializeCapacities, initializeFromFile, isRoot, postDelete, preInsert, writeNode
public AbstractMkTree(PageFile<N> pagefile, DistanceQuery<O,D> distanceQuery, DistanceFunction<O,D> distanceFunction)
pagefile
- Page filedistanceQuery
- Distance querydistanceFunction
- Distance functionpublic abstract DistanceDBIDResult<D> reverseKNNQuery(DBIDRef id, int k)
id
- the query object idk
- the number of nearest neighbors to be returned@Deprecated protected final Map<DBID,KNNResult<D>> batchNN(N node, DBIDs ids, int kmax)
node
- the node representing the subtree on which the query should be
performedids
- the ids of the query objectskmax
- Maximum k value