O
- Object typeD
- Distance typepublic class MkMaxTreeIndex<O,D extends NumberDistance<D,?>> extends MkMaxTree<O,D> implements RangeIndex<O>, KNNIndex<O>, RKNNIndex<O>, DynamicIndex
AbstractMTree.Statistics
Modifier and Type | Field and Description |
---|---|
private Relation<O> |
relation
Relation indexed.
|
knnq
EXTRA_INTEGRITY_CHECKS, settings, statistics
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
Constructor and Description |
---|
MkMaxTreeIndex(Relation<O> relation,
PageFile<MkMaxTreeNode<O,D>> pagefile,
MkTreeSettings<O,D,MkMaxTreeNode<O,D>,MkMaxEntry> settings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected MkMaxLeafEntry |
createNewLeafEntry(DBID id,
O object,
double parentDistance) |
boolean |
delete(DBIDRef id)
Throws an UnsupportedOperationException since deletion of objects is not
yet supported by an M-Tree.
|
void |
deleteAll(DBIDs ids)
Throws an UnsupportedOperationException since deletion of objects is not
yet supported by an M-Tree.
|
<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.
|
void |
insert(DBIDRef id)
Inserts the specified object into this index.
|
void |
insertAll(DBIDs ids)
Inserts the specified objects into this index.
|
createNewDirectoryEntry, createNewDirectoryNode, createNewLeafNode, createRootEntry, getLogger, initializeCapacities, kNNdistanceAdjustment, preInsert, reverseKNNQuery
createHeader, getKmax, insertAll
batchNN, distance
createEmptyRoot, distance, getDistanceFactory, getDistanceFunction, getHeight, getLeaves, getSortedEntries, insert, logStatistics, toString
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 MkMaxTreeIndex(Relation<O> relation, PageFile<MkMaxTreeNode<O,D>> pagefile, MkTreeSettings<O,D,MkMaxTreeNode<O,D>,MkMaxEntry> settings)
relation
- Relationpagefile
- Page filesettings
- Tree settingsprotected MkMaxLeafEntry createNewLeafEntry(DBID id, O object, double parentDistance)
public void initialize()
IndexTree
initialize
in interface Index
initialize
in class IndexTree<MkMaxTreeNode<O,D extends NumberDistance<D,?>>,MkMaxEntry>
public void insert(DBIDRef id)
DynamicIndex
insert
in interface DynamicIndex
id
- the object to be insertedpublic void insertAll(DBIDs ids)
DynamicIndex
insertAll
in interface DynamicIndex
ids
- the objects to be insertedpublic final boolean delete(DBIDRef id)
delete
in interface DynamicIndex
id
- Object to removeUnsupportedOperationException
- thrown, since deletions aren't
implemented yet.public void deleteAll(DBIDs ids)
deleteAll
in interface DynamicIndex
ids
- Objects to removeUnsupportedOperationException
- thrown, since deletions aren't
implemented yet.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