|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.index.tree.TreeIndex<O,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.MetricalIndex<O,D,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree<O,D,MTreeNode<O,D>,MTreeEntry<D>>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.mtree.MTree<O,D>
O
- the type of DatabaseObject to be stored in the metrical indexD
- the type of Distance used in the metrical indexpublic class MTree<O extends DatabaseObject,D extends Distance<D>>
MTree is a metrical index structure based on the concepts of the M-Tree. Apart from organizing the objects it also provides several methods to search for certain object in the structure. Persistence is not yet ensured.
Field Summary |
---|
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree |
---|
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM, extraIntegrityChecks |
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
---|
CACHE_SIZE_ID, cacheSize, dirCapacity, dirMinimum, file, FILE_ID, initialized, leafCapacity, leafMinimum, PAGE_SIZE_ID, pageSize |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
MTree()
Provides a new M-Tree. |
Method Summary | |
---|---|
protected MTreeEntry<D> |
createNewDirectoryEntry(MTreeNode<O,D> node,
Integer routingObjectID,
D parentDistance)
Creates a new directory entry representing the specified node. |
protected MTreeNode<O,D> |
createNewDirectoryNode(int capacity)
Creates a new directory node with the specified capacity. |
protected MTreeEntry<D> |
createNewLeafEntry(O object,
D parentDistance)
Creates a new leaf entry representing the specified data object. |
protected MTreeNode<O,D> |
createNewLeafNode(int capacity)
Creates a new leaf node with the specified capacity. |
protected MTreeEntry<D> |
createRootEntry()
Creates an entry representing the root node. |
protected void |
initializeCapacities(O object,
boolean verbose)
Determines the maximum and minimum number of entries in a node. |
void |
insert(List<O> objects)
Inserts the specified objects into this M-Tree sequentially since a bulk load method is not implemented so far. |
void |
insert(O object)
Inserts the specified object into this M-Tree by calling AbstractMTree.insert(object, false) . |
protected void |
preInsert(MTreeEntry<D> entry)
Does nothing because no operations are necessary before inserting an entry. |
List<DistanceResultPair<D>> |
reverseKNNQuery(O object,
int k)
Throws an UnsupportedOperationException since reverse knn queries are not yet supported by an M-Tree. |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.AbstractMTree |
---|
batchNN, createEmptyRoot, delete, distance, doKNNQuery, getDistanceFunction, getSortedEntries, getSortedEntries, insert, kNNQuery, postDelete, rangeQuery, setDatabase, setParameters, toString |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
---|
close, createHeader, getLogicalPageAccess, getNode, getNode, getPhysicalReadAccess, getPhysicalWriteAccess, getRoot, getRootEntry, getRootPath, initialize, initializeFromFile, resetPageAccess |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Constructor Detail |
---|
public MTree()
Method Detail |
---|
public void insert(O object)
AbstractMTree.insert(object, false)
.
object
- the object to be insertedpublic void insert(List<O> objects)
AbstractMTree.insert(object, false)
.
objects
- the objects to be insertedprotected void preInsert(MTreeEntry<D> entry)
preInsert
in class TreeIndex<O extends DatabaseObject,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
entry
- the entry to be insertedpublic List<DistanceResultPair<D>> reverseKNNQuery(O object, int k)
reverseKNNQuery
in class MetricalIndex<O extends DatabaseObject,D extends Distance<D>,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
object
- the query objectk
- the number of nearest neighbors to be returned
UnsupportedOperationException
protected void initializeCapacities(O object, boolean verbose)
TreeIndex
initializeCapacities
in class TreeIndex<O extends DatabaseObject,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
object
- an object that will be stored in the indexverbose
- flag to allow verbose messagesprotected MTreeEntry<D> createNewLeafEntry(O object, D parentDistance)
AbstractMTree
createNewLeafEntry
in class AbstractMTree<O extends DatabaseObject,D extends Distance<D>,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
object
- the data object to be represented by the new entryparentDistance
- the distance from the object to the routing object of the
parent node
protected MTreeEntry<D> createNewDirectoryEntry(MTreeNode<O,D> node, Integer routingObjectID, D parentDistance)
AbstractMTree
createNewDirectoryEntry
in class AbstractMTree<O extends DatabaseObject,D extends Distance<D>,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
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 node
protected MTreeEntry<D> createRootEntry()
TreeIndex
createRootEntry
in class TreeIndex<O extends DatabaseObject,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
new MTreeDirectoryEntry(null, null, 0, null)
protected MTreeNode<O,D> createNewLeafNode(int capacity)
TreeIndex
createNewLeafNode
in class TreeIndex<O extends DatabaseObject,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
capacity
- the capacity of the new node
protected MTreeNode<O,D> createNewDirectoryNode(int capacity)
TreeIndex
createNewDirectoryNode
in class TreeIndex<O extends DatabaseObject,MTreeNode<O extends DatabaseObject,D extends Distance<D>>,MTreeEntry<D extends Distance<D>>>
capacity
- the capacity of the new node
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |