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.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>
- All Implemented Interfaces:
- Index<O>, Loggable, 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_D, CACHE_SIZE_P, cacheSize, DEFAULT_CACHE_SIZE, DEFAULT_PAGE_SIZE, dirCapacity, dirMinimum, file, FILE_NAME_D, FILE_NAME_P, initialized, leafCapacity, leafMinimum, PAGE_SIZE_D, PAGE_SIZE_P, pageSize |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
close, createEmptyRoot, createHeader, createNewDirectoryNode, createNewLeafNode, createRootEntry, description, getLogicalPageAccess, getNode, getNode, getPhysicalReadAccess, getPhysicalWriteAccess, getRoot, getRootEntry, getRootPath, initialize, initializeCapacities, initializeFromFile, postDelete, preInsert, resetPageAccess, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetricalIndex
public MetricalIndex()
rangeQuery
public abstract List<QueryResult<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
kNNQuery
public abstract List<QueryResult<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<QueryResult<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