de.lmu.ifi.dbs.elki.index.tree.metrical
Class MetricalIndex<O extends DatabaseObject,D extends Distance<D>,N extends MetricalNode<N,E>,E extends MetricalEntry>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.index.tree.TreeIndex<O,N,E>
de.lmu.ifi.dbs.elki.index.tree.metrical.MetricalIndex<O,D,N,E>
- Type Parameters:
O
- the type of DatabaseObject to be stored in the metrical indexD
- the type of Distance used in the metrical indexN
- the type of MetricalNode used in the metrical indexE
- the type of MetricalEntry used in the metrical index
- All Implemented Interfaces:
- Index<O>, Parameterizable
- Direct Known Subclasses:
- AbstractMTree
public abstract class MetricalIndex<O extends DatabaseObject,D extends Distance<D>,N extends MetricalNode<N,E>,E extends MetricalEntry>
- extends TreeIndex<O,N,E>
Abstract super class for all metrical index classes.
- Author:
- Elke Achtert
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 |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
close, createEmptyRoot, createHeader, createNewDirectoryNode, createNewLeafNode, createRootEntry, getFileName, getLogicalPageAccess, getNode, getNode, getNodeClass, getPhysicalReadAccess, getPhysicalWriteAccess, getRoot, getRootEntry, getRootPath, initialize, initializeCapacities, initializeFromFile, postDelete, preInsert, resetPageAccess |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetricalIndex
public MetricalIndex(Parameterization config)
- Constructor
- Parameters:
config
- Configuration
rangeQuery
public abstract List<DistanceResultPair<D>> rangeQuery(O object,
String epsilon)
- Performs a range query for the given object with the given epsilon range
and the according distance function. The query result is in ascending order
to the distance to the query object.
- Parameters:
object
- the query objectepsilon
- the string representation of the query range
- Returns:
- a List of the query results
rangeQuery
public abstract List<DistanceResultPair<D>> rangeQuery(O object,
D epsilon)
- Performs a range query for the given object with the given epsilon range
and the according distance function. The query result is in ascending order
to the distance to the query object.
- Parameters:
object
- the query objectepsilon
- the string representation of the query range
- Returns:
- a List of the query results
kNNQuery
public abstract List<DistanceResultPair<D>> kNNQuery(O object,
int k)
- Performs a k-nearest neighbor query for the given object with the given
parameter k and the according distance function. The query result is in
ascending order to the distance to the query object.
- Parameters:
object
- the query objectk
- the number of nearest neighbors to be returned
- Returns:
- a List of the query results
reverseKNNQuery
public abstract List<DistanceResultPair<D>> reverseKNNQuery(O object,
int k)
- Performs a reverse k-nearest neighbor query for the given object ID. The
query result is in ascending order to the distance to the query object.
- Parameters:
object
- the query objectk
- the number of nearest neighbors to be returned
- Returns:
- a List of the query results
getDistanceFunction
public abstract DistanceFunction<O,D> getDistanceFunction()
- Returns the distance function of this metrical index.
- Returns:
- the distance function of this metrical index