de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractVectorDoubleDistanceFunction
java.lang.Object
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractVectorDoubleDistanceFunction
public AbstractVectorDoubleDistanceFunction()
- Constructor.
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 DatabaseObjecto2
- 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