de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.query
Class MkTreeRKNNQuery<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>
          extended by de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.query.MkTreeRKNNQuery<O,D>
All Implemented Interfaces:
DatabaseQuery, RKNNQuery<O,D>

public class MkTreeRKNNQuery<O,D extends Distance<D>>
extends AbstractRKNNQuery<O,D>

Instance of a rKNN query for a particular spatial index.


Field Summary
protected  AbstractMkTree<O,D,?,?> index
          The index to use
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.rknn.AbstractRKNNQuery
distanceQuery
 
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
MkTreeRKNNQuery(AbstractMkTree<O,D,?,?> index, DistanceQuery<O,D> distanceQuery)
          Constructor.
 
Method Summary
 List<List<DistanceResultPair<D>>> getRKNNForBulkDBIDs(ArrayDBIDs ids, int k)
          Bulk query method for reverse k nearest neighbors for ids.
 List<DistanceResultPair<D>> getRKNNForDBID(DBID id, int k)
          Get the reverse k nearest neighbors for a particular id.
 List<DistanceResultPair<D>> getRKNNForObject(O obj, int k)
          Get the reverse k nearest neighbors for a particular object.
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.rknn.AbstractRKNNQuery
getDistanceFactory
 
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
 

Field Detail

index

protected final AbstractMkTree<O,D extends Distance<D>,?,?> index
The index to use

Constructor Detail

MkTreeRKNNQuery

public MkTreeRKNNQuery(AbstractMkTree<O,D,?,?> index,
                       DistanceQuery<O,D> distanceQuery)
Constructor.

Parameters:
index - Index to use
distanceQuery - Distance query used
Method Detail

getRKNNForObject

public List<DistanceResultPair<D>> getRKNNForObject(O obj,
                                                    int k)
Description copied from interface: RKNNQuery
Get the reverse k nearest neighbors for a particular object.

Parameters:
obj - query object instance
k - number of neighbors requested
Returns:
reverse k nearest neighbors

getRKNNForDBID

public 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>>
Specified by:
getRKNNForDBID in class AbstractRKNNQuery<O,D extends Distance<D>>
Parameters:
id - query object ID
k - number of neighbors requested
Returns:
reverse k nearest neighbors

getRKNNForBulkDBIDs

public List<List<DistanceResultPair<D>>> getRKNNForBulkDBIDs(ArrayDBIDs ids,
                                                             int k)
Description copied from interface: RKNNQuery
Bulk query method for reverse k nearest neighbors for ids.

Parameters:
ids - query object IDs
k - number of neighbors requested
Returns:
reverse k nearest neighbors

Release 0.4.0 (2011-09-20_1324)