de.lmu.ifi.dbs.elki.distance.distancefunction
Class EuclideanDistanceFunction<V extends NumberVector<V,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<V,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.EuclideanDistanceFunction<V>
- Type Parameters:
V
- the type of FeatureVector to compute the distances in between
- All Implemented Interfaces:
- DistanceFunction<V,DoubleDistance>, MeasurementFunction<V,DoubleDistance>, SpatialDistanceFunction<V,DoubleDistance>, Parameterizable
public class EuclideanDistanceFunction<V extends NumberVector<V,?>>
- extends AbstractDistanceFunction<V,DoubleDistance>
- implements SpatialDistanceFunction<V,DoubleDistance>, Parameterizable
Provides the Euclidean distance for FeatureVectors.
- Author:
- Arthur Zimek
Constructor Summary |
EuclideanDistanceFunction()
Provides a Euclidean distance function that can compute the Euclidean
distance (that is a DoubleDistance) for FeatureVectors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EuclideanDistanceFunction
public EuclideanDistanceFunction()
- Provides a Euclidean distance function that can compute the Euclidean
distance (that is a DoubleDistance) for FeatureVectors.
distance
public DoubleDistance distance(V v1,
V v2)
- Provides the Euclidean distance between the given two vectors.
- Specified by:
distance
in interface DistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObject
- Returns:
- the Euclidean distance between the given two vectors as an instance
of
DoubleDistance
.
minDist
public DoubleDistance minDist(HyperBoundingBox mbr,
V v)
- Description copied from interface:
SpatialDistanceFunction
- Computes the minimum distance between the given MBR and the FeatureVector object
according to this distance function.
- Specified by:
minDist
in interface SpatialDistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
- Parameters:
mbr
- the MBR objectv
- the FeatureVector object
- Returns:
- the minimum distance between the given MBR and the FeatureVector object
according to this distance function
minDist
public DoubleDistance minDist(HyperBoundingBox mbr,
Integer id)
- Description copied from interface:
SpatialDistanceFunction
- Computes the minimum distance between the given MBR and the FeatureVector object
with the given id according to this distance function.
- Specified by:
minDist
in interface SpatialDistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
- Parameters:
mbr
- the MBR objectid
- the id of the FeatureVector object
- Returns:
- the minimum distance between the given MBR and the FeatureVector object
according to this distance function
distance
public DoubleDistance distance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
- Description copied from interface:
SpatialDistanceFunction
- Computes the distance between the two given MBRs
according to this distance function.
- Specified by:
distance
in interface SpatialDistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object
- Returns:
- the distance between the two given MBRs according to this distance function
centerDistance
public DoubleDistance centerDistance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
- Description copied from interface:
SpatialDistanceFunction
- Computes the distance between the centroids of the two given MBRs
according to this distance function.
- Specified by:
centerDistance
in interface SpatialDistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object
- Returns:
- the distance between the centroids of the two given MBRs
according to this distance function