Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.index.tree.TreeIndex<O,N,E>
              extended by 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

Field Summary
 
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
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
MetricalIndex()
           
 
Method Summary
abstract  DistanceFunction<O,D> getDistanceFunction()
          Returns the distance function of this metrical index.
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.
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.
abstract  List<QueryResult<D>> reverseKNNQuery(O object, int k)
          Performs a reverse k-nearest neighbor query for the given object ID.
 
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
 
Methods inherited from interface de.lmu.ifi.dbs.elki.index.Index
delete, insert, insert, setDatabase
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription
 

Constructor Detail

MetricalIndex

public MetricalIndex()
Method Detail

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 object
epsilon - 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 object
k - 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 object
k - 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

Release 0.1 (2008-07-10_1838)