O
- Object typeD
- Distance typepublic class MkAppTreeIndex<O,D extends NumberDistance<D,?>> extends MkAppTree<O,D> implements RangeIndex<O>, KNNIndex<O>, RKNNIndex<O>
AbstractMTree.Statistics
Modifier and Type | Field and Description |
---|---|
private Relation<O> |
relation
The relation indexed
|
knnq
EXTRA_INTEGRITY_CHECKS, settings, statistics
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
Constructor and Description |
---|
MkAppTreeIndex(Relation<O> relation,
PageFile<MkAppTreeNode<O,D>> pageFile,
MkAppTreeSettings<O,D> settings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected MkAppEntry |
createNewLeafEntry(DBID id,
O object,
double parentDistance)
Creates a new leaf entry representing the specified data object in the
specified subtree.
|
<S extends Distance<S>> |
getKNNQuery(DistanceQuery<O,S> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
<S extends Distance<S>> |
getRangeQuery(DistanceQuery<O,S> distanceQuery,
Object... hints)
Get a range query object for the given distance query and k.
|
<S extends Distance<S>> |
getRKNNQuery(DistanceQuery<O,S> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the tree if the page file already existed.
|
createNewDirectoryEntry, createNewDirectoryNode, createNewLeafNode, createRootEntry, getK_max, getLogger, initializeCapacities, insert, insertAll, preInsert, reverseKNNQuery
batchNN, distance
createEmptyRoot, distance, getDistanceFactory, getDistanceFunction, getHeight, getLeaves, getSortedEntries, logStatistics, toString
createHeader, deleteNode, getFile, getNode, getNode, getPageID, getPageSize, getRoot, getRootEntry, getRootID, getRootPath, initialize, initializeFromFile, isRoot, postDelete, writeNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
logStatistics
public MkAppTreeIndex(Relation<O> relation, PageFile<MkAppTreeNode<O,D>> pageFile, MkAppTreeSettings<O,D> settings)
relation
- Relation to indexpageFile
- Page filesettings
- Tree settingsprotected MkAppEntry createNewLeafEntry(DBID id, O object, double parentDistance)
object
- the data object to be represented by the new entryparentDistance
- the distance from the object to the routing object of
the parent nodepublic void initialize()
IndexTree
initialize
in interface Index
initialize
in class IndexTree<MkAppTreeNode<O,D extends NumberDistance<D,?>>,MkAppEntry>
public <S extends Distance<S>> KNNQuery<O,S> getKNNQuery(DistanceQuery<O,S> distanceQuery, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O>
S
- Distance typedistanceQuery
- Distance queryhints
- Hints for the optimizernull
public <S extends Distance<S>> RangeQuery<O,S> getRangeQuery(DistanceQuery<O,S> distanceQuery, Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<O>
S
- Distance typedistanceQuery
- Distance queryhints
- Hints for the optimizernull
public <S extends Distance<S>> RKNNQuery<O,S> getRKNNQuery(DistanceQuery<O,S> distanceQuery, Object... hints)
RKNNIndex
getRKNNQuery
in interface RKNNIndex<O>
S
- Distance typedistanceQuery
- Distance queryhints
- Hints for the optimizernull
public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result