de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractVectorDoubleDistanceFunction

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
      extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction
All Implemented Interfaces:
DistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDoubleDistanceFunction<NumberVector<?,?>>, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
AbstractCosineDistanceFunction, AbstractEditDistanceFunction, DimensionSelectingLatLngDistanceFunction, HistogramIntersectionDistanceFunction, LatLngDistanceFunction, LCSSDistanceFunction, LngLatDistanceFunction, LPNormDistanceFunction, MinimumDistanceFunction, PearsonCorrelationDistanceFunction, SquaredEuclideanDistanceFunction, SquaredPearsonCorrelationDistanceFunction, WeightedDistanceFunction, WeightedPearsonCorrelationDistanceFunction, WeightedSquaredEuclideanDistanceFunction, WeightedSquaredPearsonCorrelationDistanceFunction

public abstract class AbstractVectorDoubleDistanceFunction
extends AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
implements PrimitiveDoubleDistanceFunction<NumberVector<?,?>>

Abstract base class for the most common family of distance functions: defined on number vectors and returning double values.


Constructor Summary
AbstractVectorDoubleDistanceFunction()
          Constructor.
 
Method Summary
 DoubleDistance distance(NumberVector<?,?> o1, NumberVector<?,?> o2)
          Computes the distance between two given DatabaseObjects according to this distance function.
 DoubleDistance getDistanceFactory()
          Method to get the distance functions factory.
 SimpleTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
          Get the input data type of the function.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction
instantiate, isMetric, isSymmetric
 
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.distance.distancefunction.PrimitiveDoubleDistanceFunction
doubleDistance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction
instantiate, isMetric, isSymmetric
 

Constructor Detail

AbstractVectorDoubleDistanceFunction

public AbstractVectorDoubleDistanceFunction()
Constructor.

Method Detail

getInputTypeRestriction

public SimpleTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
Description copied from interface: DistanceFunction
Get the input data type of the function.

Specified by:
getInputTypeRestriction in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
Specified by:
getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
Returns:
Type restriction

distance

public final DoubleDistance distance(NumberVector<?,?> o1,
                                     NumberVector<?,?> o2)
Description copied from interface: PrimitiveDistanceFunction
Computes the distance between two given DatabaseObjects according to this distance function.

Specified by:
distance in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
Specified by:
distance in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
Parameters:
o1 - first DatabaseObject
o2 - second DatabaseObject
Returns:
the distance between two given DatabaseObjects according to this distance function

getDistanceFactory

public DoubleDistance getDistanceFactory()
Description copied from interface: DistanceFunction
Method to get the distance functions factory.

Specified by:
getDistanceFactory in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
Specified by:
getDistanceFactory in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
Returns:
Factory for distance objects

Release 0.4.0 (2011-09-20_1324)