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 AbstractMkTreeUnified<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>> extends AbstractMkTree<O,D,N,E>
Modifier and Type | Field and Description |
---|---|
private int |
k_max
Holds the maximum value of k to support.
|
distanceFunction, distanceQuery, extraIntegrityChecks
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
Constructor and Description |
---|
AbstractMkTreeUnified(PageFile<N> pagefile,
DistanceQuery<O,D> distanceQuery,
DistanceFunction<O,D> distanceFunction,
int k_max)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected TreeIndexHeader |
createHeader()
Creates a header for this index structure which is an instance of
TreeIndexHeader . |
int |
getKmax()
Get the value of k_max.
|
void |
insertAll(List<E> entries)
Bulk insert.
|
protected abstract void |
kNNdistanceAdjustment(E entry,
Map<DBID,KNNHeap<D>> knnLists)
Performs a distance adjustment in the subtree of the specified root entry.
|
reverseKNNQuery
batchNN, createEmptyRoot, createNewDirectoryEntry, distance, distance, doKNNQuery, getDistanceFactory, getDistanceFunction, getDistanceQuery, getHeight, getLeaves, getSortedEntries, getSortedEntries, insert, toString
createNewDirectoryNode, createNewLeafNode, createRootEntry, deleteNode, getFile, getLogger, getNode, getNode, getPageFileStatistics, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initialize, initializeCapacities, initializeFromFile, isRoot, postDelete, preInsert, writeNode
public AbstractMkTreeUnified(PageFile<N> pagefile, DistanceQuery<O,D> distanceQuery, DistanceFunction<O,D> distanceFunction, int k_max)
pagefile
- Page filedistanceQuery
- Distance querydistanceFunction
- Distance functionk_max
- Maximum value for kprotected TreeIndexHeader createHeader()
IndexTree
TreeIndexHeader
. Subclasses may need to overwrite this method if
they need a more specialized header.createHeader
in class IndexTree<N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
MkTreeHeader
public void insertAll(List<E> entries)
AbstractMTree
insertAll
in class AbstractMTree<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
protected abstract void kNNdistanceAdjustment(E entry, Map<DBID,KNNHeap<D>> knnLists)
entry
- the root entry of the current subtreeknnLists
- a map of knn lists for each leaf entrypublic int getKmax()