Package tutorial.distancefunction
Class MultiLPNorm
- java.lang.Object
-
- elki.distance.AbstractNumberVectorDistance
-
- tutorial.distancefunction.MultiLPNorm
-
- All Implemented Interfaces:
Distance<NumberVector>
,NumberVectorDistance<NumberVector>
,PrimitiveDistance<NumberVector>
public class MultiLPNorm extends AbstractNumberVectorDistance
Tutorial example Minowski-distance variation with different exponents for different dimensions for ELKI.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiLPNorm.Par
Parameterization class example
-
Constructor Summary
Constructors Constructor Description MultiLPNorm(double[] ps)
Constructor.
-
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
-
-