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
  extended by de.lmu.ifi.dbs.elki.index.tree.IndexTree<N,E>
      extended by de.lmu.ifi.dbs.elki.index.tree.metrical.MetricalIndexTree<O,D,N,E>
          extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree<O,D,N,E>
              extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.AbstractMkTree<O,D,N,E>
                  extended by 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 index
D - the type of Distance used in the metrical index
N - the type of MetricalNode used in the metrical index
E - 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.
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree
distanceFunction, distanceQuery, extraIntegrityChecks
 
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.IndexTree
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
 
Constructor Summary
AbstractMkTreeUnified(PageFile<N> pagefile, DistanceQuery<O,D> distanceQuery, DistanceFunction<O,D> distanceFunction, int k_max)
          Constructor.
 
Method Summary
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.
 
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mktrees.AbstractMkTree
reverseKNNQuery
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

k_max

private int k_max
Holds the maximum value of k to support.

Constructor Detail

AbstractMkTreeUnified

public AbstractMkTreeUnified(PageFile<N> pagefile,
                             DistanceQuery<O,D> distanceQuery,
                             DistanceFunction<O,D> distanceFunction,
                             int k_max)
Constructor.

Parameters:
pagefile - Page file
distanceQuery - Distance query
distanceFunction - Distance function
k_max - Maximum value for k
Method Detail

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 subtree
knnLists - a map of knn lists for each leaf entry

getKmax

public int getKmax()
Get the value of k_max.

Returns:
k_max value.

Release 0.4.0 (2011-09-20_1324)