O
- Database object typepublic class LinearScanPrimitiveSimilarityRangeQuery<O> extends AbstractSimilarityRangeQuery<O>
Modifier and Type | Field and Description |
---|---|
private PrimitiveSimilarityFunction<? super O> |
rawsim
Unboxed similarity function.
|
relation, simQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
LinearScanPrimitiveSimilarityRangeQuery(PrimitiveSimilarityQuery<O> similarityQuery)
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 PrimitiveSimilarityFunction<? super O> rawsim
public LinearScanPrimitiveSimilarityRangeQuery(PrimitiveSimilarityQuery<O> similarityQuery)
similarityQuery
- Similarity function to usepublic DoubleDBIDList getRangeForDBID(DBIDRef id, double range)
RangeQuery
getRangeForDBID
in interface RangeQuery<O>
getRangeForDBID
in class AbstractSimilarityRangeQuery<O>
id
- query object IDrange
- Query rangepublic DoubleDBIDList getRangeForObject(O obj, double range)
RangeQuery
getRangeForObject
in interface RangeQuery<O>
getRangeForObject
in class AbstractSimilarityRangeQuery<O>
obj
- Query objectrange
- Query rangepublic void getRangeForDBID(DBIDRef id, double range, ModifiableDoubleDBIDList neighbors)
RangeQuery
getRangeForDBID
in interface RangeQuery<O>
getRangeForDBID
in class AbstractSimilarityRangeQuery<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 © 2019 ELKI Development Team. License information.