de.lmu.ifi.dbs.elki.database.query.rknn
Class LinearScanRKNNQuery<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.rknn.AbstractRKNNQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.rknn.LinearScanRKNNQuery<O,D>
- Type Parameters:
O
- Database object typeD
- Distance type
- All Implemented Interfaces:
- DatabaseQuery, LinearScanQuery, RKNNQuery<O,D>
public class LinearScanRKNNQuery<O,D extends Distance<D>>
- extends AbstractRKNNQuery<O,D>
- implements LinearScanQuery
Default linear scan RKNN query class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
knnQuery
protected final KNNQuery<O,D extends Distance<D>> knnQuery
- KNN query we use.
LinearScanRKNNQuery
public LinearScanRKNNQuery(DistanceQuery<O,D> distanceQuery,
KNNQuery<O,D> knnQuery,
Integer maxk)
- Constructor.
- Parameters:
distanceQuery
- Distance function to useknnQuery
- kNN query to use.maxk
- k to use
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.
- Specified by:
getRKNNForObject
in interface RKNNQuery<O,D extends Distance<D>>
- Parameters:
obj
- query object instancek
- 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 IDk
- 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.
- Specified by:
getRKNNForBulkDBIDs
in interface RKNNQuery<O,D extends Distance<D>>
- Parameters:
ids
- query object IDsk
- number of neighbors requested
- Returns:
- reverse k nearest neighbors