de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.query
Class GenericRStarTreeRangeQuery<O extends SpatialComparable,D extends Distance<D>>
java.lang.Object
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.index.tree.spatial.rstarvariants.query.GenericRStarTreeRangeQuery<O,D>
- All Implemented Interfaces:
- DatabaseQuery, RangeQuery<O,D>
public class GenericRStarTreeRangeQuery<O extends SpatialComparable,D extends Distance<D>>
- extends AbstractDistanceRangeQuery<O,D>
Instance of a range query for a particular spatial index.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tree
protected final AbstractRStarTree<?,?> tree
- The index to use
distanceFunction
protected final SpatialPrimitiveDistanceFunction<? super O extends SpatialComparable,D extends Distance<D>> distanceFunction
- Spatial primitive distance function
GenericRStarTreeRangeQuery
public GenericRStarTreeRangeQuery(AbstractRStarTree<?,?> tree,
SpatialDistanceQuery<O,D> distanceQuery)
- Constructor.
- Parameters:
tree
- Index to usedistanceQuery
- Distance query to use
doRangeQuery
protected List<DistanceResultPair<D>> doRangeQuery(O object,
D epsilon)
- Perform the actual query process.
- Parameters:
object
- Query objectepsilon
- Query range
- Returns:
- Objects contained in query range.
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:
getRangeForObject
in interface RangeQuery<O extends SpatialComparable,D extends Distance<D>>
- Specified by:
getRangeForObject
in class AbstractDistanceRangeQuery<O extends SpatialComparable,D extends Distance<D>>
- Parameters:
obj
- Query objectrange
- 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:
getRangeForDBID
in interface RangeQuery<O extends SpatialComparable,D extends Distance<D>>
- Specified by:
getRangeForDBID
in class AbstractDistanceRangeQuery<O extends SpatialComparable,D extends Distance<D>>
- Parameters:
id
- query object IDrange
- Query range
- Returns:
- neighbors