de.lmu.ifi.dbs.elki.distance.distancefunction
Class EuklideanDistanceFunction<T extends NumberVector<T,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<T>
de.lmu.ifi.dbs.elki.distance.distancefunction.EuklideanDistanceFunction<T>
- All Implemented Interfaces:
- DistanceFunction<T,DoubleDistance>, MeasurementFunction<T,DoubleDistance>, SpatialDistanceFunction<T,DoubleDistance>, Loggable, Parameterizable
public class EuklideanDistanceFunction<T extends NumberVector<T,?>>
- extends AbstractDoubleDistanceFunction<T>
- implements SpatialDistanceFunction<T,DoubleDistance>
Provides the Euklidean distance for FeatureVectors.
- Author:
- Arthur Zimek
Constructor Summary |
EuklideanDistanceFunction()
Provides a Euklidean distance function that can compute the Euklidean
distance (that is a DoubleDistance) for FeatureVectors. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EuklideanDistanceFunction
public EuklideanDistanceFunction()
- Provides a Euklidean distance function that can compute the Euklidean
distance (that is a DoubleDistance) for FeatureVectors.
distance
public DoubleDistance distance(T rv1,
T rv2)
- Provides the Euklidean distance between the given two vectors.
- Specified by:
distance
in interface DistanceFunction<T extends NumberVector<T,?>,DoubleDistance>
- Parameters:
rv1
- first DatabaseObjectrv2
- second DatabaseObject
- Returns:
- the Euklidean distance between the given two vectors as an
instance of
DoubleDistance
. - See Also:
DistanceFunction.distance(de.lmu.ifi.dbs.elki.data.DatabaseObject,de.lmu.ifi.dbs.elki.data.DatabaseObject)
description
public String description()
- Description copied from interface:
Parameterizable
- Returns a description of the class and the required parameters.
This description should be suitable for a usage description as for a standalone application.
- Specified by:
description
in interface Parameterizable
- Overrides:
description
in class AbstractParameterizable
- Returns:
- String a description of the class and the required parameters
- See Also:
Parameterizable.description()
minDist
public DoubleDistance minDist(HyperBoundingBox mbr,
T o)
- Computes the minimum distance between the given MBR and the RealVector
object according to this distance function.
- Specified by:
minDist
in interface SpatialDistanceFunction<T extends NumberVector<T,?>,DoubleDistance>
- Parameters:
mbr
- the MBR objecto
- the FeatureVector object
- Returns:
- the minimum distance between the given MBR and the SpatialData
object according to this distance function
- See Also:
SpatialDistanceFunction.minDist(de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox,de.lmu.ifi.dbs.elki.data.FeatureVector)
minDist
public DoubleDistance minDist(HyperBoundingBox mbr,
Integer id)
- Computes the minimum distance between the given MBR and the NumberVector object
with the given id according to this distance function.
- Specified by:
minDist
in interface SpatialDistanceFunction<T extends NumberVector<T,?>,DoubleDistance>
- Parameters:
mbr
- the MBR objectid
- the id of the NumberVector object
- Returns:
- the minimum distance between the given MBR and the SpatialData object
according to this distance function
distance
public DoubleDistance distance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
- Computes the distance between the two given MBRs according to this
distance function.
- Specified by:
distance
in interface SpatialDistanceFunction<T extends NumberVector<T,?>,DoubleDistance>
- Parameters:
mbr1
- the first MBR objectmbr2
- the second MBR object
- Returns:
- the distance between the two given MBRs according to this
distance function
- See Also:
SpatialDistanceFunction.distance(HyperBoundingBox,HyperBoundingBox)
centerDistance
public DoubleDistance centerDistance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
- Computes the distance between the centroids of the two given MBRs
according to this distance function.
- Specified by:
centerDistance
in interface SpatialDistanceFunction<T extends NumberVector<T,?>,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
- See Also:
SpatialDistanceFunction.centerDistance(HyperBoundingBox,de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox)