public class MetricalIndexRangeQuery<O,D extends Distance<D>> extends AbstractDistanceRangeQuery<O,D>
Modifier and Type | Field and Description |
---|---|
protected AbstractMTree<O,D,?,?> |
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 |
---|
MetricalIndexRangeQuery(AbstractMTree<O,D,?,?> index,
DistanceQuery<O,D> distanceQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
doRangeQuery(DBID o_p,
AbstractMTreeNode<O,D,?,?> node,
O q,
D r_q,
GenericDistanceDBIDList<D> result)
Performs a range query on the specified subtree.
|
DistanceDBIDResult<D> |
getRangeForDBID(DBIDRef id,
D range)
Get the nearest neighbors for a particular id in a given query range
|
DistanceDBIDResult<D> |
getRangeForObject(O obj,
D range)
Get the nearest neighbors for a particular object in a given query range
|
getRelation
protected final AbstractMTree<O,D extends Distance<D>,?,?> index
public MetricalIndexRangeQuery(AbstractMTree<O,D,?,?> index, DistanceQuery<O,D> distanceQuery)
index
- Index to usedistanceQuery
- Distance query usedprivate void doRangeQuery(DBID o_p, AbstractMTreeNode<O,D,?,?> node, O q, D r_q, GenericDistanceDBIDList<D> result)
o_p
- the routing object of the specified nodenode
- the root of the subtree to be traversedq
- the id of the query objectr_q
- the query rangeresult
- the list holding the query resultspublic DistanceDBIDResult<D> getRangeForObject(O obj, D range)
RangeQuery
getRangeForObject
in interface RangeQuery<O,D extends Distance<D>>
getRangeForObject
in class AbstractDistanceRangeQuery<O,D extends Distance<D>>
obj
- Query objectrange
- Query rangepublic DistanceDBIDResult<D> getRangeForDBID(DBIDRef id, D range)
RangeQuery
getRangeForDBID
in interface RangeQuery<O,D extends Distance<D>>
getRangeForDBID
in class AbstractDistanceRangeQuery<O,D extends Distance<D>>
id
- query object IDrange
- Query range