O
- Database object typepublic class LinearScanPrimitiveDistanceRangeQuery<O> extends AbstractDistanceRangeQuery<O>
Modifier and Type | Field and Description |
---|---|
private PrimitiveDistanceFunction<? super O> |
rawdist
Unboxed distance function.
|
distanceQuery, relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
LinearScanPrimitiveDistanceRangeQuery(PrimitiveDistanceQuery<O> distanceQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDBIDList |
getRangeForDBID(DBIDRef id,
double range)
Get the neighbors for a particular id in a given query range
|
void |
getRangeForDBID(DBIDRef id,
double range,
ModifiableDoubleDBIDList neighbors)
Get the neighbors for a particular object in a given query range
|
DoubleDBIDList |
getRangeForObject(O obj,
double range)
Get the neighbors for a particular object in a given query range
|
void |
getRangeForObject(O obj,
double range,
ModifiableDoubleDBIDList neighbors)
Get the neighbors for a particular object in a given query range
|
private void |
linearScan(Relation<? extends O> relation,
DBIDIter iter,
O obj,
double range,
ModifiableDoubleDBIDList result)
Main loop for linear scan,
|
private PrimitiveDistanceFunction<? super O> rawdist
public LinearScanPrimitiveDistanceRangeQuery(PrimitiveDistanceQuery<O> distanceQuery)
distanceQuery
- Distance function to usepublic DoubleDBIDList getRangeForDBID(DBIDRef id, double range)
RangeQuery
getRangeForDBID
in interface RangeQuery<O>
getRangeForDBID
in class AbstractDistanceRangeQuery<O>
id
- query object IDrange
- Query rangepublic DoubleDBIDList getRangeForObject(O obj, double range)
RangeQuery
getRangeForObject
in interface RangeQuery<O>
getRangeForObject
in class AbstractDistanceRangeQuery<O>
obj
- Query objectrange
- Query rangepublic void getRangeForDBID(DBIDRef id, double range, ModifiableDoubleDBIDList neighbors)
RangeQuery
getRangeForDBID
in interface RangeQuery<O>
getRangeForDBID
in class AbstractDistanceRangeQuery<O>
id
- query object IDrange
- Query rangeneighbors
- Neighbors output setpublic void getRangeForObject(O obj, double range, ModifiableDoubleDBIDList neighbors)
RangeQuery
obj
- Query objectrange
- Query rangeneighbors
- Neighbors output setprivate void linearScan(Relation<? extends O> relation, DBIDIter iter, O obj, double range, ModifiableDoubleDBIDList result)
relation
- Data relationiter
- Iteratorobj
- Query objectrange
- Query radiusresult
- Output data structureCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.