Package elki.distance.subspace
Class SubspaceEuclideanDistance
- java.lang.Object
-
- elki.distance.subspace.AbstractDimensionsSelectingDistance<NumberVector>
-
- elki.distance.subspace.SubspaceLPNormDistance
-
- elki.distance.subspace.SubspaceEuclideanDistance
-
- All Implemented Interfaces:
Distance<NumberVector>,Norm<NumberVector>,NumberVectorDistance<NumberVector>,PrimitiveDistance<NumberVector>,SpatialPrimitiveDistance<NumberVector>,DimensionSelectingSubspaceDistance<NumberVector>
public class SubspaceEuclideanDistance extends SubspaceLPNormDistance
Euclidean distance function betweenNumberVectors only in specified dimensions.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubspaceEuclideanDistance.ParParameterization class.
-
Field Summary
-
Fields inherited from class elki.distance.subspace.AbstractDimensionsSelectingDistance
dimensions
-
-
Constructor Summary
Constructors Constructor Description SubspaceEuclideanDistance(long[] dimensions)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledistance(NumberVector v1, NumberVector v2)Constructor.booleanequals(java.lang.Object obj)inthashCode()doubleminDist(SpatialComparable mbr1, SpatialComparable mbr2)Computes the distance between the two given MBRs according to this distance function.protected doubleminDistObject(SpatialComparable mbr, NumberVector v)doublenorm(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)
Constructor.- Specified by:
distancein interfaceNumberVectorDistance<NumberVector>- Specified by:
distancein interfacePrimitiveDistance<NumberVector>- Overrides:
distancein classSubspaceLPNormDistance- Parameters:
v1- first feature vectorv2- second feature vector- Returns:
- the Euclidean distance between two given feature vectors in the selected dimensions
-
minDistObject
protected double minDistObject(SpatialComparable mbr, NumberVector v)
- Overrides:
minDistObjectin classSubspaceLPNormDistance
-
minDist
public double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
Description copied from interface:SpatialPrimitiveDistanceComputes the distance between the two given MBRs according to this distance function.- Specified by:
minDistin interfaceSpatialPrimitiveDistance<NumberVector>- Overrides:
minDistin 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:NormCompute the norm of object obj.- Specified by:
normin interfaceNorm<NumberVector>- Overrides:
normin classSubspaceLPNormDistance- Parameters:
obj- Object- Returns:
- Norm
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classSubspaceLPNormDistance
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSubspaceLPNormDistance
-
-