de.lmu.ifi.dbs.elki.database.query.distance
Interface DistanceQuery<O,D extends Distance<?>>

All Superinterfaces:
DatabaseQuery
All Known Subinterfaces:
DistanceSimilarityQuery<O,D>, FilteredLocalPCABasedDistanceFunction.Instance<T,I,D>, IndexBasedDistanceFunction.Instance<T,I,D>, SpatialDistanceQuery<V,D>
All Known Implementing Classes:
AbstractDatabaseDistanceFunction.Instance, AbstractDatabaseDistanceQuery, AbstractDistanceQuery, AbstractIndexBasedDistanceFunction.Instance, AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance, AbstractSimilarityAdapter.Instance, DBIDDistanceQuery, DiSHDistanceFunction.Instance, ERiCDistanceFunction.Instance, HiSCDistanceFunction.Instance, LocallyWeightedDistanceFunction.Instance, MinKDistance.Instance, PCABasedCorrelationDistanceFunction.Instance, PrimitiveDistanceQuery, PrimitiveDistanceSimilarityQuery, SharedNearestNeighborJaccardDistanceFunction.Instance, SimilarityAdapterArccos.Instance, SimilarityAdapterLinear.Instance, SimilarityAdapterLn.Instance, SpatialPrimitiveDistanceQuery, SubspaceDistanceFunction.Instance

public interface DistanceQuery<O,D extends Distance<?>>
extends DatabaseQuery

A distance query serves as adapter layer for database and primitive distances.


Field Summary
 
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
 
Method Summary
 D distance(DBID id1, DBID id2)
          Returns the distance between the two objects specified by their object ids.
 D distance(DBID id1, O o2)
          Returns the distance between the two objects specified by their object ids.
 D distance(O o1, DBID id2)
          Returns the distance between the two objects specified by their object ids.
 D distance(O o1, O o2)
          Returns the distance between the two objects specified by their object ids.
 D getDistanceFactory()
          Method to get the distance functions factory.
 DistanceFunction<? super O,D> getDistanceFunction()
          Get the inner distance function.
 Relation<? extends O> getRelation()
          Access the underlying data query.
 D infiniteDistance()
          Provides an infinite distance.
 D nullDistance()
          Provides a null distance.
 D undefinedDistance()
          Provides an undefined distance.
 

Method Detail

distance

D distance(DBID id1,
           DBID id2)
Returns the distance between the two objects specified by their object ids.

Parameters:
id1 - first object id
id2 - second object id
Returns:
the distance between the two objects specified by their object ids

distance

D distance(O o1,
           DBID id2)
Returns the distance between the two objects specified by their object ids.

Parameters:
o1 - first object
id2 - second object id
Returns:
the distance between the two objects specified by their object ids

distance

D distance(DBID id1,
           O o2)
Returns the distance between the two objects specified by their object ids.

Parameters:
id1 - first object id
o2 - second object
Returns:
the distance between the two objects specified by their object ids

distance

D distance(O o1,
           O o2)
Returns the distance between the two objects specified by their object ids.

Parameters:
o1 - first object
o2 - second object
Returns:
the distance between the two objects specified by their object ids

getDistanceFactory

D getDistanceFactory()
Method to get the distance functions factory.

Returns:
Factory for distance objects

getDistanceFunction

DistanceFunction<? super O,D> getDistanceFunction()
Get the inner distance function.

Returns:
Distance function

infiniteDistance

D infiniteDistance()
Provides an infinite distance.

Returns:
an infinite distance

nullDistance

D nullDistance()
Provides a null distance.

Returns:
a null distance

undefinedDistance

D undefinedDistance()
Provides an undefined distance.

Returns:
an undefined distance

getRelation

Relation<? extends O> getRelation()
Access the underlying data query.

Returns:
data query in use

Release 0.4.0 (2011-09-20_1324)