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,
DBID q,
D r_q,
List<DistanceResultPair<D>> result)
Performs a range query on the specified subtree.
|
private void |
doRangeQuery(DBID o_p,
AbstractMTreeNode<O,D,?,?> node,
O q,
D r_q,
List<DistanceResultPair<D>> result)
Performs a range query on the specified subtree.
|
List<DistanceResultPair<D>> |
getRangeForDBID(DBID id,
D range)
Get the nearest neighbors for a particular id in a given query range
|
List<DistanceResultPair<D>> |
getRangeForObject(O obj,
D range)
Get the nearest neighbors for a particular object in a given query range
|
getDistanceFactory, getRangeForBulkDBIDs
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, DBID q, D r_q, List<DistanceResultPair<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 resultsprivate void doRangeQuery(DBID o_p, AbstractMTreeNode<O,D,?,?> node, O q, D r_q, List<DistanceResultPair<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 List<DistanceResultPair<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 List<DistanceResultPair<D>> getRangeForDBID(DBID 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