
O - Object typepublic abstract class MkTabTree<O> extends AbstractMkTreeUnified<O,MkTabTreeNode<O>,MkTabEntry,MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry>>
AbstractMTree.Statistics| Modifier and Type | Field and Description |
|---|---|
private static Logging |
LOG
The logger for this class.
|
knnqEXTRA_INTEGRITY_CHECKS, settings, statisticsdirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum| Constructor and Description |
|---|
MkTabTree(Relation<O> relation,
PageFile<MkTabTreeNode<O>> pagefile,
MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry> settings)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected MkTabEntry |
createNewDirectoryEntry(MkTabTreeNode<O> node,
DBID routingObjectID,
double parentDistance)
Creates a new directory entry representing the specified node.
|
protected MkTabTreeNode<O> |
createNewDirectoryNode()
Creates a new directory node with the specified capacity.
|
protected MkTabTreeNode<O> |
createNewLeafNode()
Creates a new leaf node with the specified capacity.
|
protected MkTabEntry |
createRootEntry()
Creates an entry representing the root node.
|
private void |
doReverseKNNQuery(int k,
DBIDRef q,
MkTabEntry node_entry,
MkTabTreeNode<O> node,
ModifiableDoubleDBIDList result)
Performs a k-nearest neighbor query in the specified subtree for the given
query object and the given parameter k.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
protected void |
initializeCapacities(MkTabEntry exampleLeaf)
Determines the maximum and minimum number of entries in a node.
|
private double[] |
initKnnDistanceList()
Returns a knn distance list with all distances set to null distance.
|
void |
insert(MkTabEntry entry,
boolean withPreInsert)
Inserts the specified object into this M-Tree.
|
protected void |
kNNdistanceAdjustment(MkTabEntry entry,
Map<DBID,KNNList> knnLists)
Performs a distance adjustment in the subtree of the specified root entry.
|
private double[] |
max(double[] distances1,
double[] distances2)
Returns an array that holds the maximum values of the both specified arrays
in each index.
|
protected void |
preInsert(MkTabEntry entry)
Performs necessary operations before inserting the specified entry.
|
DoubleDBIDList |
reverseKNNQuery(DBIDRef id,
int k)
Performs a reverse k-nearest neighbor query for the given object ID.
|
createHeader, getKmax, insertAllbatchNN, distancecreateEmptyRoot, distance, getDistanceFunction, getHeight, getLeaves, getSortedEntries, logStatistics, toStringdeleteNode, getFile, getNode, getNode, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initialize, initializeFromFile, isRoot, postDelete, writeNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLongName, getShortNameprivate static final Logging LOG
public MkTabTree(Relation<O> relation, PageFile<MkTabTreeNode<O>> pagefile, MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry> settings)
relation - Relationpagefile - Page filesettings - Settingsprotected void preInsert(MkTabEntry entry)
IndexTreepreInsert in class IndexTree<MkTabTreeNode<O>,MkTabEntry>entry - the entry to be insertedUnsupportedOperationException - since insertion of single objects is
not supportedpublic void insert(MkTabEntry entry, boolean withPreInsert)
AbstractMTreeinsert in class AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry>>entry - the entry to be insertedwithPreInsert - if this flag is true, the preInsert method will be
called before inserting the objectUnsupportedOperationException - since insertion of single objects is
not supportedpublic DoubleDBIDList reverseKNNQuery(DBIDRef id, int k)
AbstractMkTreereverseKNNQuery in class AbstractMkTree<O,MkTabTreeNode<O>,MkTabEntry,MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry>>id - the query object idk - the number of nearest neighbors to be returnedprotected void initializeCapacities(MkTabEntry exampleLeaf)
IndexTreeinitializeCapacities in class IndexTree<MkTabTreeNode<O>,MkTabEntry>exampleLeaf - an object that will be stored in the indexprotected void kNNdistanceAdjustment(MkTabEntry entry, Map<DBID,KNNList> knnLists)
AbstractMkTreeUnifiedkNNdistanceAdjustment in class AbstractMkTreeUnified<O,MkTabTreeNode<O>,MkTabEntry,MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry>>entry - the root entry of the current subtreeknnLists - a map of knn lists for each leaf entryprotected MkTabTreeNode<O> createNewLeafNode()
IndexTreecreateNewLeafNode in class IndexTree<MkTabTreeNode<O>,MkTabEntry>protected MkTabTreeNode<O> createNewDirectoryNode()
createNewDirectoryNode in class IndexTree<MkTabTreeNode<O>,MkTabEntry>protected MkTabEntry createNewDirectoryEntry(MkTabTreeNode<O> node, DBID routingObjectID, double parentDistance)
createNewDirectoryEntry in class AbstractMTree<O,MkTabTreeNode<O>,MkTabEntry,MkTreeSettings<O,MkTabTreeNode<O>,MkTabEntry>>node - the node to be represented by the new entryroutingObjectID - the id of the routing object of the nodeparentDistance - the distance from the routing object of the node to
the routing object of the parent nodeprotected MkTabEntry createRootEntry()
createRootEntry in class IndexTree<MkTabTreeNode<O>,MkTabEntry>private void doReverseKNNQuery(int k,
DBIDRef q,
MkTabEntry node_entry,
MkTabTreeNode<O> node,
ModifiableDoubleDBIDList result)
k - the parameter k of the knn-queryq - the id of the query objectnode_entry - the entry representing the nodenode - the root of the subtreeresult - the list holding the query resultprivate double[] max(double[] distances1,
double[] distances2)
distances1 - the first arraydistances2 - the second arrayprivate double[] initKnnDistanceList()
protected Logging getLogger()
IndexTreegetLogger in class IndexTree<MkTabTreeNode<O>,MkTabEntry>Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.