O
- Database object typepublic class LinearScanEuclideanDistanceRangeQuery<O extends NumberVector> extends LinearScanPrimitiveDistanceRangeQuery<O>
Modifier and Type | Field and Description |
---|---|
private static SquaredEuclideanDistanceFunction |
SQUARED
Squared Euclidean distance function.
|
distanceQuery, relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
LinearScanEuclideanDistanceRangeQuery(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 static final SquaredEuclideanDistanceFunction SQUARED
public LinearScanEuclideanDistanceRangeQuery(PrimitiveDistanceQuery<O> distanceQuery)
distanceQuery
- Distance function to usepublic DoubleDBIDList getRangeForDBID(DBIDRef id, double range)
RangeQuery
getRangeForDBID
in interface RangeQuery<O extends NumberVector>
getRangeForDBID
in class LinearScanPrimitiveDistanceRangeQuery<O extends NumberVector>
id
- query object IDrange
- Query rangepublic DoubleDBIDList getRangeForObject(O obj, double range)
RangeQuery
getRangeForObject
in interface RangeQuery<O extends NumberVector>
getRangeForObject
in class LinearScanPrimitiveDistanceRangeQuery<O extends NumberVector>
obj
- Query objectrange
- Query rangepublic void getRangeForDBID(DBIDRef id, double range, ModifiableDoubleDBIDList neighbors)
RangeQuery
getRangeForDBID
in interface RangeQuery<O extends NumberVector>
getRangeForDBID
in class LinearScanPrimitiveDistanceRangeQuery<O extends NumberVector>
id
- query object IDrange
- Query rangeneighbors
- Neighbors output setpublic void getRangeForObject(O obj, double range, ModifiableDoubleDBIDList neighbors)
RangeQuery
getRangeForObject
in interface RangeQuery<O extends NumberVector>
getRangeForObject
in class LinearScanPrimitiveDistanceRangeQuery<O extends NumberVector>
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.