Class MTreeRangeByObject<O>
- java.lang.Object
-
- elki.index.tree.metrical.mtreevariants.query.MTreeRangeByObject<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
RangeSearcher<O>
public class MTreeRangeByObject<O> extends java.lang.Object implements RangeSearcher<O>
Instance of a range query for a particular spatial index.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected DistanceQuery<O>
distanceQuery
Hold the distance function to be used.protected AbstractMTree<O,?,?,?>
index
The index to use
-
Constructor Summary
Constructors Constructor Description MTreeRangeByObject(AbstractMTree<O,?,?,?> index, DistanceQuery<O> distanceQuery)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doRangeQuery(DBID o_p, AbstractMTreeNode<O,?,?> node, O q, double r_q, ModifiableDoubleDBIDList result)
Performs a range query on the specified subtree.ModifiableDoubleDBIDList
getRange(O obj, double range, ModifiableDoubleDBIDList result)
Get the neighbors for a particular id in a given query range.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.database.query.range.RangeSearcher
getRange
-
-
-
-
Field Detail
-
index
protected final AbstractMTree<O,?,?,?> index
The index to use
-
distanceQuery
protected final DistanceQuery<O> distanceQuery
Hold the distance function to be used.
-
-
Constructor Detail
-
MTreeRangeByObject
public MTreeRangeByObject(AbstractMTree<O,?,?,?> index, DistanceQuery<O> distanceQuery)
Constructor.- Parameters:
index
- Index to usedistanceQuery
- Distance query used
-
-
Method Detail
-
doRangeQuery
private void doRangeQuery(DBID o_p, AbstractMTreeNode<O,?,?> node, O q, double r_q, ModifiableDoubleDBIDList 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 nodenode
- the root of the subtree to be traversedq
- the query objectr_q
- the query rangeresult
- the list holding the query results
-
getRange
public ModifiableDoubleDBIDList getRange(O obj, double range, ModifiableDoubleDBIDList result)
Description copied from interface:RangeSearcher
Get the neighbors for a particular id in a given query range.- Specified by:
getRange
in interfaceRangeSearcher<O>
- Parameters:
obj
- query object IDrange
- Query rangeresult
- Output data structure- Returns:
- neighbors
-
-