
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
|
distanceQueryrelationHINT_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.
|
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
|
getRelationprotected 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 DistanceDBIDResult<D> getRangeForObject(O obj, D range)
RangeQuerygetRangeForObject 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)
RangeQuerygetRangeForDBID in interface RangeQuery<O,D extends Distance<D>>getRangeForDBID in class AbstractDistanceRangeQuery<O,D extends Distance<D>>id - query object IDrange - Query range