Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class DimensionsSelectingEuklideanDistanceFunction<V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<V>
                      extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDimensionsSelectingDoubleDistanceFunction<V>
                          extended by de.lmu.ifi.dbs.elki.distance.distancefunction.DimensionsSelectingEuklideanDistanceFunction<V>
All Implemented Interfaces:
DistanceFunction<V,DoubleDistance>, MeasurementFunction<V,DoubleDistance>, SpatialDistanceFunction<V,DoubleDistance>, Loggable, Parameterizable

public class DimensionsSelectingEuklideanDistanceFunction<V extends NumberVector<V,?>>
extends AbstractDimensionsSelectingDoubleDistanceFunction<V>
implements SpatialDistanceFunction<V,DoubleDistance>

Provides a distance function that computes the Euklidean distance between feature vectors only in specified dimensions.

Author:
Elke Achtert

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDimensionsSelectingDoubleDistanceFunction
DIMS_D, DIMS_P
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
INFINITY_PATTERN
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
DimensionsSelectingEuklideanDistanceFunction()
          Provides a distance function that computes the Euklidean distance between feature vectors only in specified dimensions
 
Method Summary
 DoubleDistance centerDistance(HyperBoundingBox mbr1, HyperBoundingBox mbr2)
          Computes the distance between the centroids of the two given MBRs according to this distance function.
 String description()
          Returns a description of the class and the required parameters.
 DoubleDistance distance(HyperBoundingBox mbr1, HyperBoundingBox mbr2)
          Computes the distance between the two given MBRs according to this distance function.
 DoubleDistance distance(V v1, V v2)
          Provides the Euklidean distance between two given feature vectors in the selected dimensions.
 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.
 DoubleDistance minDist(HyperBoundingBox mbr, V o)
          Computes the minimum distance between the given MBR and the RealVector object according to this distance function.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDimensionsSelectingDoubleDistanceFunction
getSelectedDimensions, setParameters, setSelectedDimensions
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction
infiniteDistance, nullDistance, undefinedDistance, valueOf
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction
distance, distance, isInfiniteDistance, isNullDistance, isUndefinedDistance
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, matches, requiredInputPattern, setDatabase, setRequiredInputPattern
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, 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
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction
distance, distance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
infiniteDistance, isInfiniteDistance, isNullDistance, isUndefinedDistance, nullDistance, requiredInputPattern, setDatabase, undefinedDistance, valueOf
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription, setParameters
 

Constructor Detail

DimensionsSelectingEuklideanDistanceFunction

public DimensionsSelectingEuklideanDistanceFunction()
Provides a distance function that computes the Euklidean distance between feature vectors only in specified dimensions

Method Detail

distance

public DoubleDistance distance(V v1,
                               V v2)
Provides the Euklidean distance between two given feature vectors in the selected dimensions.

Specified by:
distance in interface DistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
Parameters:
v1 - first feature vector
v2 - second feature vector
Returns:
the Euklidean distance between two given feature vectors in the selected dimensions

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,
                              V o)
Computes the minimum distance between the given MBR and the RealVector object according to this distance function.

Specified by:
minDist in interface SpatialDistanceFunction<V extends NumberVector<V,?>,DoubleDistance>
Parameters:
mbr - the MBR object
o - 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<V extends NumberVector<V,?>,DoubleDistance>
Parameters:
mbr - the MBR object
id - 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<V extends NumberVector<V,?>,DoubleDistance>
Parameters:
mbr1 - the first MBR object
mbr2 - the second MBR object
Returns:
the distance between the two given MBRs according to this distance function
See Also:
SpatialDistanceFunction.distance(de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox,de.lmu.ifi.dbs.elki.utilities.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<V extends NumberVector<V,?>,DoubleDistance>
Parameters:
mbr1 - the first MBR object
mbr2 - the second MBR object
Returns:
the distance between the centroids of the two given MBRs according to this distance function
See Also:
SpatialDistanceFunction.centerDistance(de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox,de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox)

Release 0.1 (2008-07-10_1838)