Class DeLiCluTreeIndex<O extends NumberVector>
- java.lang.Object
-
- elki.index.tree.IndexTree<N,E>
-
- elki.index.tree.spatial.rstarvariants.AbstractRStarTree<N,E,S>
-
- elki.index.tree.spatial.rstarvariants.NonFlatRStarTree<DeLiCluNode,DeLiCluEntry,RTreeSettings>
-
- elki.index.tree.spatial.rstarvariants.deliclu.DeLiCluTree
-
- elki.index.tree.spatial.rstarvariants.deliclu.DeLiCluTreeIndex<O>
-
- Type Parameters:
O- Object type
- All Implemented Interfaces:
DistancePriorityIndex<O>,DynamicIndex,Index,KNNIndex<O>,RangeIndex<O>
public class DeLiCluTreeIndex<O extends NumberVector> extends DeLiCluTree implements DistancePriorityIndex<O>, DynamicIndex
The common use of the DeLiClu tree: indexing number vectors.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class elki.index.tree.spatial.rstarvariants.AbstractRStarTree
AbstractRStarTree.Statistics
-
-
Field Summary
Fields Modifier and Type Field Description private static LoggingLOGThe appropriate logger for this index.private Relation<O>relationThe relation we index.-
Fields inherited from class elki.index.tree.spatial.rstarvariants.AbstractRStarTree
EXTRA_INTEGRITY_CHECKS, height, settings, statistics
-
Fields inherited from class elki.index.tree.IndexTree
dirCapacity, dirMinimum, initialized, leafCapacity, leafMinimum
-
-
Constructor Summary
Constructors Constructor Description DeLiCluTreeIndex(Relation<O> relation, PageFile<DeLiCluNode> pagefile, RTreeSettings settings)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DeLiCluLeafEntrycreateNewLeafEntry(DBID id)Creates a new leaf entry representing the specified data object.booleandelete(DBIDRef id)Deletes the specified object from this index.voiddeleteAll(DBIDs ids)Deletes the specified objects from this index.protected LogginggetLogger()Get the (STATIC) logger for this class.voidinitialize()Initialize the tree if the page file already existed.voidinsert(DBIDRef id)Inserts the specified real vector object into this index.voidinsertAll(DBIDs ids)Inserts the specified objects into this index.KNNSearcher<O>kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)Get a KNN query object for the given distance query and k.PrioritySearcher<O>priorityByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)Get a priority search object.RangeSearcher<O>rangeByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)Get a range query object for the given distance query and k.IndexTreePath<DeLiCluEntry>setHandled(DBIDRef id, O obj)Marks the specified object as handled and returns the path of node ids from the root to the objects's parent.-
Methods inherited from class elki.index.tree.spatial.rstarvariants.deliclu.DeLiCluTree
createNewDirectoryEntry, createNewDirectoryNode, createNewLeafNode, createRootEntry, getExpanded, getExpanded, setExpanded
-
Methods inherited from class elki.index.tree.spatial.rstarvariants.NonFlatRStarTree
bulkLoad, computeHeight, createEmptyRoot, hasOverflow, hasUnderflow
-
Methods inherited from class elki.index.tree.spatial.rstarvariants.AbstractRStarTree
adjustTree, canBulkLoad, choosePath, containedTest, createBulkLeafNodes, createNewRoot, deletePath, doExtraIntegrityChecks, findPathToObject, getHeight, getLeaves, initializeCapacities, initializeFromFile, insertEntry, insertLeaf, logStatistics, reInsert, setHeight, toString
-
Methods inherited from class elki.index.tree.IndexTree
createHeader, deleteNode, getFile, getNode, getNode, getPageID, getPageSize, getRootEntry, getRootID, getRootPath, initialize, isRoot, postDelete, preInsert, writeNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface elki.index.DistancePriorityIndex
priorityByDBID
-
Methods inherited from interface elki.index.Index
logStatistics
-
Methods inherited from interface elki.index.RangeIndex
rangeByDBID
-
-
-
-
Field Detail
-
relation
private Relation<O extends NumberVector> relation
The relation we index.
-
LOG
private static final Logging LOG
The appropriate logger for this index.
-
-
Constructor Detail
-
DeLiCluTreeIndex
public DeLiCluTreeIndex(Relation<O> relation, PageFile<DeLiCluNode> pagefile, RTreeSettings settings)
Constructor.- Parameters:
relation- Relation to indexpagefile- Page filesettings- Tree settings
-
-
Method Detail
-
createNewLeafEntry
protected DeLiCluLeafEntry createNewLeafEntry(DBID id)
Creates a new leaf entry representing the specified data object.- Parameters:
id- Object id
-
setHandled
public IndexTreePath<DeLiCluEntry> setHandled(DBIDRef id, O obj)
Marks the specified object as handled and returns the path of node ids from the root to the objects's parent.- Parameters:
id- the objects id to be marked as handledobj- the object to be marked as handled- Returns:
- the path of node ids from the root to the objects's parent
-
initialize
public void initialize()
Description copied from class:IndexTreeInitialize the tree if the page file already existed.- Specified by:
initializein interfaceIndex- Overrides:
initializein classIndexTree<DeLiCluNode,DeLiCluEntry>
-
insert
public final void insert(DBIDRef id)
Inserts the specified real vector object into this index.- Specified by:
insertin interfaceDynamicIndex- Parameters:
id- the object id that was inserted
-
insertAll
public final void insertAll(DBIDs ids)
Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk.- Specified by:
insertAllin interfaceDynamicIndex- Parameters:
ids- the objects to be inserted
-
delete
public final boolean delete(DBIDRef id)
Deletes the specified object from this index.- Specified by:
deletein interfaceDynamicIndex- Parameters:
id- Object to remove- Returns:
- true if this index did contain the object with the specified id, false otherwise
-
deleteAll
public void deleteAll(DBIDs ids)
Description copied from interface:DynamicIndexDeletes the specified objects from this index.- Specified by:
deleteAllin interfaceDynamicIndex- Parameters:
ids- Objects to remove
-
kNNByObject
public KNNSearcher<O> kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Description copied from interface:KNNIndexGet a KNN query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Specified by:
kNNByObjectin interfaceDistancePriorityIndex<O extends NumberVector>- Specified by:
kNNByObjectin interfaceKNNIndex<O extends NumberVector>- Parameters:
distanceQuery- Distance querymaxk- Maximum value of kflags- Hints for the optimizer- Returns:
- KNN Query object or
null
-
rangeByObject
public RangeSearcher<O> rangeByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)
Description copied from interface:RangeIndexGet a range query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Specified by:
rangeByObjectin interfaceDistancePriorityIndex<O extends NumberVector>- Specified by:
rangeByObjectin interfaceRangeIndex<O extends NumberVector>- Parameters:
distanceQuery- Distance querymaxradius- Maximum rangeflags- Hints for the optimizer- Returns:
- KNN Query object or
null
-
priorityByObject
public PrioritySearcher<O> priorityByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)
Description copied from interface:DistancePriorityIndexGet a priority search object.- Specified by:
priorityByObjectin interfaceDistancePriorityIndex<O extends NumberVector>- Parameters:
distanceQuery- Distance querymaxradius- Maximum search range (may beDouble.POSITIVE_INFINITYflags- Optimizer hints- Returns:
- Priority searcher
-
getLogger
protected Logging getLogger()
Description copied from class:IndexTreeGet the (STATIC) logger for this class.- Overrides:
getLoggerin classDeLiCluTree- Returns:
- the static logger
-
-