de.lmu.ifi.dbs.elki.database.query.rknn
Class AbstractRKNNQuery<O,D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
      extended by de.lmu.ifi.dbs.elki.database.query.rknn.AbstractRKNNQuery<O,D>
All Implemented Interfaces:
DatabaseQuery, RKNNQuery<O,D>
Direct Known Subclasses:
LinearScanRKNNQuery, MkTreeRKNNQuery

public abstract class AbstractRKNNQuery<O,D extends Distance<D>>
extends AbstractDataBasedQuery<O>
implements RKNNQuery<O,D>

Instance for the query on a particular database.


Field Summary
protected  DistanceQuery<O,D> distanceQuery
          Hold the distance function to be used.
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
relation
 
Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
 
Constructor Summary
AbstractRKNNQuery(DistanceQuery<O,D> distanceQuery)
          Constructor.
 
Method Summary
 D getDistanceFactory()
          Get the distance data type of the function.
abstract  List<DistanceResultPair<D>> getRKNNForDBID(DBID id, int k)
          Get the reverse k nearest neighbors for a particular id.
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
getRelation
 
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.database.query.rknn.RKNNQuery
getRelation, getRKNNForBulkDBIDs, getRKNNForObject
 

Field Detail

distanceQuery

protected final DistanceQuery<O,D extends Distance<D>> distanceQuery
Hold the distance function to be used.

Constructor Detail

AbstractRKNNQuery

public AbstractRKNNQuery(DistanceQuery<O,D> distanceQuery)
Constructor.

Parameters:
distanceQuery - distance query
Method Detail

getRKNNForDBID

public abstract List<DistanceResultPair<D>> getRKNNForDBID(DBID id,
                                                           int k)
Description copied from interface: RKNNQuery
Get the reverse k nearest neighbors for a particular id.

Specified by:
getRKNNForDBID in interface RKNNQuery<O,D extends Distance<D>>
Parameters:
id - query object ID
k - number of neighbors requested
Returns:
reverse k nearest neighbors

getDistanceFactory

public D getDistanceFactory()
Description copied from interface: RKNNQuery
Get the distance data type of the function.

Specified by:
getDistanceFactory in interface RKNNQuery<O,D extends Distance<D>>

Release 0.4.0 (2011-09-20_1324)