de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.query
Class MetricalIndexRangeQuery<O,D extends Distance<D>>
java.lang.Object
   de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
       de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery<O,D>
           de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.query.MetricalIndexRangeQuery<O,D>
de.lmu.ifi.dbs.elki.index.tree.metrical.mtreevariants.query.MetricalIndexRangeQuery<O,D>
- All Implemented Interfaces: 
- DatabaseQuery, RangeQuery<O,D>
- public class MetricalIndexRangeQuery<O,D extends Distance<D>> 
- extends AbstractDistanceRangeQuery<O,D>
 
Instance of a range query for a particular spatial index.
 
 
 
 
 
| Method Summary | 
| 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
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
index
protected final AbstractMTree<O,D extends Distance<D>,?,?> index
- The index to use
 
 
MetricalIndexRangeQuery
public MetricalIndexRangeQuery(AbstractMTree<O,D,?,?> index,
                               DistanceQuery<O,D> distanceQuery)
- Constructor.
 
- Parameters:
- index- Index to use
- distanceQuery- Distance query used
 
doRangeQuery
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. It recursively traverses
 all paths from the specified node, which cannot be excluded from leading to
 qualifying objects.
 
- 
- Parameters:
- o_p- the routing object of the specified node
- node- the root of the subtree to be traversed
- q- the id of the query object
- r_q- the query range
- result- the list holding the query results
 
doRangeQuery
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. It recursively traverses
 all paths from the specified node, which cannot be excluded from leading to
 qualifying objects.
 
- 
- Parameters:
- o_p- the routing object of the specified node
- node- the root of the subtree to be traversed
- q- the id of the query object
- r_q- the query range
- result- the list holding the query results
 
getRangeForObject
public List<DistanceResultPair<D>> getRangeForObject(O obj,
                                                     D range)
- Description copied from interface: RangeQuery
- Get the nearest neighbors for a particular object in a given query range
 
- 
- Specified by:
- getRangeForObjectin interface- RangeQuery<O,D extends Distance<D>>
- Specified by:
- getRangeForObjectin class- AbstractDistanceRangeQuery<O,D extends Distance<D>>
 
- 
- Parameters:
- obj- Query object
- range- Query range
- Returns:
- neighbors
 
getRangeForDBID
public List<DistanceResultPair<D>> getRangeForDBID(DBID id,
                                                   D range)
- Description copied from interface: RangeQuery
- Get the nearest neighbors for a particular id in a given query range
 
- 
- Specified by:
- getRangeForDBIDin interface- RangeQuery<O,D extends Distance<D>>
- Specified by:
- getRangeForDBIDin class- AbstractDistanceRangeQuery<O,D extends Distance<D>>
 
- 
- Parameters:
- id- query object ID
- range- Query range
- Returns:
- neighbors