de.lmu.ifi.dbs.elki.distance.distancefunction
Interface DistanceFunction<O,D extends Distance<?>>

Type Parameters:
O - Object type
D - Distance result type
All Superinterfaces:
InspectionUtilFrequentlyScanned, Parameterizable
All Known Subinterfaces:
DBIDDistanceFunction<D>, FilteredLocalPCABasedDistanceFunction<O,P,D>, IndexBasedDistanceFunction<O,D>, PrimitiveDistanceFunction<O,D>, PrimitiveDoubleDistanceFunction<O>, SpatialPrimitiveDistanceFunction<V,D>, SpatialPrimitiveDoubleDistanceFunction<V>
All Known Implementing Classes:
AbstractCosineDistanceFunction, AbstractDatabaseDistanceFunction, AbstractDBIDDistanceFunction, AbstractDimensionsSelectingDoubleDistanceFunction, AbstractEditDistanceFunction, AbstractIndexBasedDistanceFunction, AbstractPreferenceVectorBasedCorrelationDistanceFunction, AbstractPrimitiveDistanceFunction, AbstractSimilarityAdapter, AbstractVectorDoubleDistanceFunction, ArcCosineDistanceFunction, CosineDistanceFunction, DimensionSelectingDistanceFunction, DimensionSelectingLatLngDistanceFunction, DimensionsSelectingEuclideanDistanceFunction, DiSHDistanceFunction, DiskCacheBasedDoubleDistanceFunction, DiskCacheBasedFloatDistanceFunction, DTWDistanceFunction, EDRDistanceFunction, ERiCDistanceFunction, ERPDistanceFunction, EuclideanDistanceFunction, FileBasedDoubleDistanceFunction, FileBasedFloatDistanceFunction, FooKernelFunction, HiSCDistanceFunction, HistogramIntersectionDistanceFunction, HSBHistogramQuadraticDistanceFunction, LatLngDistanceFunction, LCSSDistanceFunction, LinearKernelFunction, LngLatDistanceFunction, LocallyWeightedDistanceFunction, LPNormDistanceFunction, ManhattanDistanceFunction, MaximumDistanceFunction, MinimumDistanceFunction, MinKDistance, PCABasedCorrelationDistanceFunction, PearsonCorrelationDistanceFunction, PolynomialKernelFunction, ProxyDistanceFunction, RandomStableDistanceFunction, RGBHistogramQuadraticDistanceFunction, SharedNearestNeighborJaccardDistanceFunction, SimilarityAdapterArccos, SimilarityAdapterLinear, SimilarityAdapterLn, SquaredEuclideanDistanceFunction, SquaredPearsonCorrelationDistanceFunction, SubspaceDistanceFunction, WeightedDistanceFunction, WeightedLPNormDistanceFunction, WeightedPearsonCorrelationDistanceFunction, WeightedSquaredEuclideanDistanceFunction, WeightedSquaredPearsonCorrelationDistanceFunction

public interface DistanceFunction<O,D extends Distance<?>>
extends Parameterizable

Base interface for any kind of distances.


Method Summary
 D getDistanceFactory()
          Method to get the distance functions factory.
 TypeInformation getInputTypeRestriction()
          Get the input data type of the function.
<T extends O>
DistanceQuery<T,D>
instantiate(Relation<T> relation)
          Instantiate with a database to get the actual distance query.
 boolean isMetric()
          Is this distance function metric (in particular, does it satisfy the triangle equation?)
 boolean isSymmetric()
          Is this function symmetric?
 

Method Detail

getDistanceFactory

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

Returns:
Factory for distance objects

isSymmetric

boolean isSymmetric()
Is this function symmetric?

Returns:
true when symmetric

isMetric

boolean isMetric()
Is this distance function metric (in particular, does it satisfy the triangle equation?)

Returns:
true when metric.

getInputTypeRestriction

TypeInformation getInputTypeRestriction()
Get the input data type of the function.

Returns:
Type restriction

instantiate

<T extends O> DistanceQuery<T,D> instantiate(Relation<T> relation)
Instantiate with a database to get the actual distance query.

Parameters:
relation - The representation to use
Returns:
Actual distance query.

Release 0.4.0 (2011-09-20_1324)