de.lmu.ifi.dbs.elki.database.query.range
Class AbstractDistanceRangeQuery<O,D extends Distance<D>>

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,D>
Type Parameters:
O - Database object type
D - Distance type
All Implemented Interfaces:
DatabaseQuery, RangeQuery<O,D>
Direct Known Subclasses:
DoubleDistanceRStarTreeRangeQuery, GenericRStarTreeRangeQuery, LinearScanRangeQuery, MetricalIndexRangeQuery

public abstract class AbstractDistanceRangeQuery<O,D extends Distance<D>>
extends AbstractDataBasedQuery<O>
implements RangeQuery<O,D>

Abstract base class for range queries that use a distance query in their instance


Field Summary
protected  DistanceQuery<O,D> distanceQuery
          Hold the distance function to be used.
 
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
AbstractDistanceRangeQuery(DistanceQuery<O,D> distanceQuery)
          Constructor.
 
Method Summary
 D getDistanceFactory()
          Get the distance data type of the function.
 List<List<DistanceResultPair<D>>> getRangeForBulkDBIDs(ArrayDBIDs ids, D range)
          Bulk query method
abstract  List<DistanceResultPair<D>> getRangeForDBID(DBID id, D range)
          Get the nearest neighbors for a particular id in a given query range
abstract  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 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

distanceQuery

protected DistanceQuery<O,D extends Distance<D>> distanceQuery
Hold the distance function to be used.

Constructor Detail

AbstractDistanceRangeQuery

public AbstractDistanceRangeQuery(DistanceQuery<O,D> distanceQuery)
Constructor.

Parameters:
distanceQuery - Distance query
Method Detail

getRangeForDBID

public abstract 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,D extends Distance<D>>
Parameters:
id - query object ID
range - Query range
Returns:
neighbors

getRangeForObject

public abstract 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,D extends Distance<D>>
Parameters:
obj - Query object
range - Query range
Returns:
neighbors

getRangeForBulkDBIDs

public List<List<DistanceResultPair<D>>> getRangeForBulkDBIDs(ArrayDBIDs ids,
                                                              D range)
Description copied from interface: RangeQuery
Bulk query method

Specified by:
getRangeForBulkDBIDs in interface RangeQuery<O,D extends Distance<D>>
Parameters:
ids - query object IDs
range - Query range
Returns:
neighbors

getDistanceFactory

public D getDistanceFactory()
Description copied from interface: RangeQuery
Get the distance data type of the function.

Specified by:
getDistanceFactory in interface RangeQuery<O,D extends Distance<D>>

Release 0.4.0 (2011-09-20_1324)