Package elki.distance.subspace
Class SubspaceMaximumDistance
- java.lang.Object
-
- elki.distance.subspace.AbstractDimensionsSelectingDistance<NumberVector>
-
- elki.distance.subspace.SubspaceLPNormDistance
-
- elki.distance.subspace.SubspaceMaximumDistance
-
- All Implemented Interfaces:
Distance<NumberVector>
,Norm<NumberVector>
,NumberVectorDistance<NumberVector>
,PrimitiveDistance<NumberVector>
,SpatialPrimitiveDistance<NumberVector>
,DimensionSelectingSubspaceDistance<NumberVector>
public class SubspaceMaximumDistance extends SubspaceLPNormDistance
Maximum distance function betweenNumberVector
s only in specified dimensions.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubspaceMaximumDistance.Par
Parameterization class.
-
Field Summary
-
Fields inherited from class elki.distance.subspace.AbstractDimensionsSelectingDistance
dimensions
-
-
Constructor Summary
Constructors Constructor Description SubspaceMaximumDistance(long[] dimensions)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(NumberVector v1, NumberVector v2)
Computes the distance between two given DatabaseObjects according to this distance function.boolean
equals(java.lang.Object obj)
int
hashCode()
double
minDist(SpatialComparable mbr1, SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance function.protected double
minDistObject(SpatialComparable mbr, NumberVector v)
double
norm(NumberVector obj)
Compute the norm of object obj.-
Methods inherited from class elki.distance.subspace.SubspaceLPNormDistance
getInputTypeRestriction, getP, instantiate, isMetric
-
Methods inherited from class elki.distance.subspace.AbstractDimensionsSelectingDistance
getSelectedDimensions, setSelectedDimensions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.distance.Distance
isSquared, isSymmetric
-
-
-
-
Method Detail
-
distance
public double distance(NumberVector v1, NumberVector v2)
Description copied from interface:PrimitiveDistance
Computes the distance between two given DatabaseObjects according to this distance function.- Specified by:
distance
in interfaceNumberVectorDistance<NumberVector>
- Specified by:
distance
in interfacePrimitiveDistance<NumberVector>
- Overrides:
distance
in classSubspaceLPNormDistance
- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObject- Returns:
- the distance between two given DatabaseObjects according to this distance function
-
minDistObject
protected double minDistObject(SpatialComparable mbr, NumberVector v)
- Overrides:
minDistObject
in classSubspaceLPNormDistance
-
minDist
public double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
Description copied from interface:SpatialPrimitiveDistance
Computes the distance between the two given MBRs according to this distance function.- Specified by:
minDist
in interfaceSpatialPrimitiveDistance<NumberVector>
- Overrides:
minDist
in classSubspaceLPNormDistance
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object- Returns:
- the distance between the two given MBRs according to this distance function
-
norm
public double norm(NumberVector obj)
Description copied from interface:Norm
Compute the norm of object obj.- Specified by:
norm
in interfaceNorm<NumberVector>
- Overrides:
norm
in classSubspaceLPNormDistance
- Parameters:
obj
- Object- Returns:
- Norm
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classSubspaceLPNormDistance
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSubspaceLPNormDistance
-
-