Package elki.distance.minkowski
Class SparseMaximumDistance
- java.lang.Object
-
- elki.distance.minkowski.SparseLPNormDistance
-
- elki.distance.minkowski.SparseMaximumDistance
-
- All Implemented Interfaces:
Distance<SparseNumberVector>
,Norm<SparseNumberVector>
,PrimitiveDistance<SparseNumberVector>
public class SparseMaximumDistance extends SparseLPNormDistance
Maximum distance, optimized forSparseNumberVector
s. The maximum distance is defined as: \[ \text{Maximum}(\vec{x},\vec{y}) := \max_i |x_i-y_i| \] and can be seen as limiting case of theLPNormDistance
for \( p \rightarrow \infty \).- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SparseMaximumDistance.Par
Parameterizer
-
Field Summary
Fields Modifier and Type Field Description static SparseMaximumDistance
STATIC
Static instance
-
Constructor Summary
Constructors Constructor Description SparseMaximumDistance()
Deprecated.Use static instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(SparseNumberVector v1, SparseNumberVector v2)
Computes the distance between two given DatabaseObjects according to this distance function.double
norm(SparseNumberVector v1)
Compute the norm of object obj.-
Methods inherited from class elki.distance.minkowski.SparseLPNormDistance
getInputTypeRestriction, isMetric
-
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
isSquared, isSymmetric
-
Methods inherited from interface elki.distance.PrimitiveDistance
instantiate
-
-
-
-
Field Detail
-
STATIC
public static final SparseMaximumDistance STATIC
Static instance
-
-
Constructor Detail
-
SparseMaximumDistance
@Deprecated public SparseMaximumDistance()
Deprecated.Use static instanceConstructor - useSTATIC
instead.
-
-
Method Detail
-
distance
public double distance(SparseNumberVector v1, SparseNumberVector v2)
Description copied from interface:PrimitiveDistance
Computes the distance between two given DatabaseObjects according to this distance function.- Specified by:
distance
in interfacePrimitiveDistance<SparseNumberVector>
- Overrides:
distance
in classSparseLPNormDistance
- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObject- Returns:
- the distance between two given DatabaseObjects according to this distance function
-
norm
public double norm(SparseNumberVector v1)
Description copied from interface:Norm
Compute the norm of object obj.- Specified by:
norm
in interfaceNorm<SparseNumberVector>
- Overrides:
norm
in classSparseLPNormDistance
- Parameters:
v1
- Object- Returns:
- Norm
-
-