Package tutorial.distancefunction
Class TutorialDistance
- java.lang.Object
-
- elki.distance.AbstractNumberVectorDistance
-
- tutorial.distancefunction.TutorialDistance
-
- All Implemented Interfaces:
Distance<NumberVector>
,NumberVectorDistance<NumberVector>
,PrimitiveDistance<NumberVector>
public class TutorialDistance extends AbstractNumberVectorDistance
Tutorial distance function example for ELKI.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description TutorialDistance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(NumberVector o1, NumberVector o2)
Computes the distance between two given vectors according to this distance function.SimpleTypeInformation<? super NumberVector>
getInputTypeRestriction()
Get the input data type of the function.-
Methods inherited from class elki.distance.AbstractNumberVectorDistance
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.distance.Distance
isMetric, isSquared, isSymmetric
-
Methods inherited from interface elki.distance.PrimitiveDistance
instantiate
-
-
-
-
Method Detail
-
distance
public double distance(NumberVector o1, NumberVector o2)
Description copied from interface:NumberVectorDistance
Computes the distance between two given vectors according to this distance function.- Parameters:
o1
- first vectoro2
- second vector- Returns:
- the distance between two given vectors according to this distance function
-
getInputTypeRestriction
public SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
Description copied from interface:Distance
Get the input data type of the function.- Specified by:
getInputTypeRestriction
in interfaceDistance<NumberVector>
- Specified by:
getInputTypeRestriction
in interfacePrimitiveDistance<NumberVector>
- Overrides:
getInputTypeRestriction
in classAbstractNumberVectorDistance
- Returns:
- Type restriction
-
-