O
- Database object typepublic class DoubleOptimizedDistanceRangeQuery<O> extends AbstractDistanceRangeQuery<O,DoubleDistance> implements LinearScanQuery
Modifier and Type | Field and Description |
---|---|
(package private) PrimitiveDoubleDistanceFunction<? super O> |
rawdist
Raw distance function.
|
distanceQuery
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
DoubleOptimizedDistanceRangeQuery(DistanceQuery<O,DoubleDistance> distanceQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DistanceDBIDList<DoubleDistance> |
getRangeForDBID(DBIDRef id,
DoubleDistance range)
Get the nearest neighbors for a particular id in a given query range
|
DistanceDBIDList<DoubleDistance> |
getRangeForObject(O obj,
DoubleDistance range)
Get the nearest neighbors for a particular object in a given query range
|
private static <O> void |
linearScan(Relation<? extends O> relation,
DBIDIter iter,
PrimitiveDoubleDistanceFunction<? super O> rawdist,
O obj,
double range,
ModifiableDoubleDistanceDBIDList result) |
getDistanceFactory
getRelation
PrimitiveDoubleDistanceFunction<? super O> rawdist
public DoubleOptimizedDistanceRangeQuery(DistanceQuery<O,DoubleDistance> distanceQuery)
distanceQuery
- Distance function to usepublic DistanceDBIDList<DoubleDistance> getRangeForDBID(DBIDRef id, DoubleDistance range)
RangeQuery
getRangeForDBID
in interface RangeQuery<O,DoubleDistance>
getRangeForDBID
in class AbstractDistanceRangeQuery<O,DoubleDistance>
id
- query object IDrange
- Query rangepublic DistanceDBIDList<DoubleDistance> getRangeForObject(O obj, DoubleDistance range)
RangeQuery
getRangeForObject
in interface RangeQuery<O,DoubleDistance>
getRangeForObject
in class AbstractDistanceRangeQuery<O,DoubleDistance>
obj
- Query objectrange
- Query rangeprivate static <O> void linearScan(Relation<? extends O> relation, DBIDIter iter, PrimitiveDoubleDistanceFunction<? super O> rawdist, O obj, double range, ModifiableDoubleDistanceDBIDList result)