de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.query
Class DoubleDistanceRStarTreeRangeQuery<O extends SpatialComparable>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
      extended by de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery<O,DoubleDistance>
          extended by de.lmu.ifi.dbs.elki.index.tree.spatial.rstarvariants.query.DoubleDistanceRStarTreeRangeQuery<O>
All Implemented Interfaces:
DatabaseQuery, RangeQuery<O,DoubleDistance>

public class DoubleDistanceRStarTreeRangeQuery<O extends SpatialComparable>
extends AbstractDistanceRangeQuery<O,DoubleDistance>

Instance of a range query for a particular spatial index.


Field Summary
protected  SpatialPrimitiveDoubleDistanceFunction<? super O> distanceFunction
          Spatial primitive distance function
protected  AbstractRStarTree<?,?> tree
          The index to use
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery
distanceQuery
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
relation
 
Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
 
Constructor Summary
DoubleDistanceRStarTreeRangeQuery(AbstractRStarTree<?,?> tree, DistanceQuery<O,DoubleDistance> distanceQuery, SpatialPrimitiveDoubleDistanceFunction<? super O> distanceFunction)
          Constructor.
 
Method Summary
protected  List<DistanceResultPair<DoubleDistance>> doRangeQuery(O object, double epsilon)
          Perform the actual query process.
 List<DistanceResultPair<DoubleDistance>> getRangeForDBID(DBID id, DoubleDistance range)
          Get the nearest neighbors for a particular id in a given query range
 List<DistanceResultPair<DoubleDistance>> getRangeForObject(O obj, DoubleDistance range)
          Get the nearest neighbors for a particular object in a given query range
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.range.AbstractDistanceRangeQuery
getDistanceFactory, getRangeForBulkDBIDs
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
getRelation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.database.query.range.RangeQuery
getRelation
 

Field Detail

tree

protected final AbstractRStarTree<?,?> tree
The index to use


distanceFunction

protected final SpatialPrimitiveDoubleDistanceFunction<? super O extends SpatialComparable> distanceFunction
Spatial primitive distance function

Constructor Detail

DoubleDistanceRStarTreeRangeQuery

public DoubleDistanceRStarTreeRangeQuery(AbstractRStarTree<?,?> tree,
                                         DistanceQuery<O,DoubleDistance> distanceQuery,
                                         SpatialPrimitiveDoubleDistanceFunction<? super O> distanceFunction)
Constructor.

Parameters:
tree - Index to use
distanceQuery - Distance query to use
distanceFunction - Distance function
Method Detail

doRangeQuery

protected List<DistanceResultPair<DoubleDistance>> doRangeQuery(O object,
                                                                double epsilon)
Perform the actual query process.

Parameters:
object - Query object
epsilon - Query range
Returns:
Objects contained in query range.

getRangeForObject

public List<DistanceResultPair<DoubleDistance>> getRangeForObject(O obj,
                                                                  DoubleDistance 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,DoubleDistance>
Specified by:
getRangeForObject in class AbstractDistanceRangeQuery<O extends SpatialComparable,DoubleDistance>
Parameters:
obj - Query object
range - Query range
Returns:
neighbors

getRangeForDBID

public List<DistanceResultPair<DoubleDistance>> getRangeForDBID(DBID id,
                                                                DoubleDistance 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,DoubleDistance>
Specified by:
getRangeForDBID in class AbstractDistanceRangeQuery<O extends SpatialComparable,DoubleDistance>
Parameters:
id - query object ID
range - Query range
Returns:
neighbors

Release 0.4.0 (2011-09-20_1324)