|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.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<O>
de.lmu.ifi.dbs.elki.distance.distancefunction.DimensionSelectingDistanceFunction<N,O>
public class DimensionSelectingDistanceFunction<N extends Number,O extends FeatureVector<O,N>>
Provides a distance function that computes the distance between feature vectors as the absolute difference of their values in a specified dimension.
Field Summary | |
---|---|
private int |
dim
The dimension to be considered for distance computation. |
static String |
DIM_D
Description for parameter dim. |
static String |
DIM_P
Option string for parameter dim. |
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 | |
---|---|
DimensionSelectingDistanceFunction()
|
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(O o1,
O o2)
Computes the distance between two given DatabaseObjects according to this distance function. |
int |
getSelectedDimension()
Returns the selected dimension. |
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,
O o)
Computes the minimum distance between the given MBR and the NumberVector object according to this distance function. |
String[] |
setParameters(String[] args)
Sets the attributes of the class accordingly to the given parameters. |
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 |
Field Detail |
---|
public static final String DIM_P
public static final String DIM_D
private int dim
Constructor Detail |
---|
public DimensionSelectingDistanceFunction()
Method Detail |
---|
public DoubleDistance distance(O o1, O o2)
distance
in interface DistanceFunction<O extends FeatureVector<O,N>,DoubleDistance>
o1
- first DatabaseObjecto2
- second DatabaseObject
public String description()
description
in interface Parameterizable
description
in class AbstractParameterizable
Parameterizable.description()
public DoubleDistance minDist(HyperBoundingBox mbr, O o)
minDist
in interface SpatialDistanceFunction<O extends FeatureVector<O,N>,DoubleDistance>
mbr
- the MBR objecto
- the NumberVector object
public DoubleDistance minDist(HyperBoundingBox mbr, Integer id)
minDist
in interface SpatialDistanceFunction<O extends FeatureVector<O,N>,DoubleDistance>
mbr
- the MBR objectid
- the id of the NumberVector object
public DoubleDistance distance(HyperBoundingBox mbr1, HyperBoundingBox mbr2)
distance
in interface SpatialDistanceFunction<O extends FeatureVector<O,N>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR object
public DoubleDistance centerDistance(HyperBoundingBox mbr1, HyperBoundingBox mbr2)
centerDistance
in interface SpatialDistanceFunction<O extends FeatureVector<O,N>,DoubleDistance>
mbr1
- the first MBR objectmbr2
- the second MBR object
public String[] setParameters(String[] args) throws ParameterException
Parameterizable
setParameters
in interface Parameterizable
setParameters
in class AbstractParameterizable
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingParameterizable.setParameters(String[])
public int getSelectedDimension()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |