public class DoubleDistanceMetricalIndexRangeQuery<O> extends AbstractDistanceRangeQuery<O,DoubleDistance>
Modifier and Type | Field and Description |
---|---|
protected PrimitiveDoubleDistanceFunction<? super O> |
distf
Distance function
|
protected AbstractMTree<O,DoubleDistance,?,?,?> |
index
The index to use
|
distanceQuery
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
DoubleDistanceMetricalIndexRangeQuery(AbstractMTree<O,DoubleDistance,?,?,?> index,
DistanceQuery<O,DoubleDistance> distanceQuery,
PrimitiveDoubleDistanceFunction<? super O> distf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
doRangeQuery(DBID id_p,
AbstractMTreeNode<O,DoubleDistance,?,?> node,
O q,
double r_q,
ModifiableDoubleDistanceDBIDList result)
Performs a range query on the specified subtree.
|
DistanceDBIDList<DoubleDistance> |
getRangeForObject(O obj,
DoubleDistance range)
Get the nearest neighbors for a particular object in a given query range
|
getDistanceFactory, getRangeForDBID
getRelation
protected final AbstractMTree<O,DoubleDistance,?,?,?> index
protected PrimitiveDoubleDistanceFunction<? super O> distf
public DoubleDistanceMetricalIndexRangeQuery(AbstractMTree<O,DoubleDistance,?,?,?> index, DistanceQuery<O,DoubleDistance> distanceQuery, PrimitiveDoubleDistanceFunction<? super O> distf)
index
- Index to usedistanceQuery
- Distance query useddistf
- Distance functionprivate void doRangeQuery(DBID id_p, AbstractMTreeNode<O,DoubleDistance,?,?> node, O q, double r_q, ModifiableDoubleDistanceDBIDList result)
id_p
- the routing object of the specified nodenode
- the root of the subtree to be traversedq
- the query objectr_q
- the query rangeresult
- the list holding the query resultspublic DistanceDBIDList<DoubleDistance> getRangeForObject(O obj, DoubleDistance range)
RangeQuery
getRangeForObject
in interface RangeQuery<O,DoubleDistance>
getRangeForObject
in class AbstractDistanceRangeQuery<O,DoubleDistance>
obj
- Query objectrange
- Query range