de.lmu.ifi.dbs.elki.database.query.range
Class LinearScanPrimitiveDistanceRangeQuery<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.range.LinearScanRangeQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.range.LinearScanPrimitiveDistanceRangeQuery<O,D>
- Type Parameters:
O
- Database object typeD
- Distance type
- All Implemented Interfaces:
- DatabaseQuery, LinearScanQuery, RangeQuery<O,D>
public class LinearScanPrimitiveDistanceRangeQuery<O,D extends Distance<D>>
- extends LinearScanRangeQuery<O,D>
Default linear scan range query class.
Subtle optimization: for primitive distances, retrieve the query object only
once from the relation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearScanPrimitiveDistanceRangeQuery
public LinearScanPrimitiveDistanceRangeQuery(PrimitiveDistanceQuery<O,D> distanceQuery)
- Constructor.
- Parameters:
distanceQuery
- Distance function to use
getRangeForDBID
public List<DistanceResultPair<D>> getRangeForDBID(DBID id,
D range)
- Description copied from interface:
RangeQuery
- Get the nearest neighbors for a particular id in a given query range
- Specified by:
getRangeForDBID
in interface RangeQuery<O,D extends Distance<D>>
- Overrides:
getRangeForDBID
in class LinearScanRangeQuery<O,D extends Distance<D>>
- Parameters:
id
- query object IDrange
- Query range
- Returns:
- neighbors