de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees
Class AbstractMkTreeUnified<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.index.tree.IndexTree<N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.MetricalIndexTree<O,D,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree<O,D,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.AbstractMkTree<O,D,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.AbstractMkTreeUnified<O,D,N,E>
- Type Parameters:
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 index
- Direct Known Subclasses:
- MkMaxTree, MkTabTree
public 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>
Abstract class for all M-Tree variants supporting processing of reverse
k-nearest neighbor queries by using the k-nn distances of the entries, where
k is less than or equal to the given parameter.
Field Summary |
private int |
k_max
Holds the maximum value of k to support. |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree |
batchNN, createEmptyRoot, createNewDirectoryEntry, distance, distance, doKNNQuery, getDistanceFactory, getDistanceFunction, getDistanceQuery, getHeight, getLeaves, getSortedEntries, getSortedEntries, insert, toString |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.IndexTree |
createNewDirectoryNode, createNewLeafNode, createRootEntry, deleteNode, getFile, getLogger, getNode, getNode, getPageFileStatistics, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initialize, initializeCapacities, initializeFromFile, isRoot, postDelete, preInsert, writeNode |
k_max
private int k_max
- Holds the maximum value of k to support.
AbstractMkTreeUnified
public AbstractMkTreeUnified(PageFile<N> pagefile,
DistanceQuery<O,D> distanceQuery,
DistanceFunction<O,D> distanceFunction,
int k_max)
- Constructor.
- Parameters:
pagefile
- Page filedistanceQuery
- Distance querydistanceFunction
- Distance functionk_max
- Maximum value for k
createHeader
protected TreeIndexHeader createHeader()
- Description copied from class:
IndexTree
- Creates a header for this index structure which is an instance of
TreeIndexHeader
. Subclasses may need to overwrite this method if
they need a more specialized header.
- Overrides:
createHeader
in class IndexTree<N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
- Returns:
- a new
MkTreeHeader
insertAll
public void insertAll(List<E> entries)
- Description copied from class:
AbstractMTree
- Bulk insert.
- Overrides:
insertAll
in class AbstractMTree<O,D extends Distance<D>,N extends AbstractMTreeNode<O,D,N,E>,E extends MTreeEntry<D>>
kNNdistanceAdjustment
protected abstract void kNNdistanceAdjustment(E entry,
Map<DBID,KNNHeap<D>> knnLists)
- Performs a distance adjustment in the subtree of the specified root entry.
- Parameters:
entry
- the root entry of the current subtreeknnLists
- a map of knn lists for each leaf entry
getKmax
public int getKmax()
- Get the value of k_max.
- Returns:
- k_max value.