|
|
|||||||||||||||||||||
| 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<V>
de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.DimensionSelectingDistanceFunction<N,V>
N - number typeV - the type of FeatureVector to compute the distances in betweenpublic class DimensionSelectingDistanceFunction<N extends Number,V extends FeatureVector<V,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 OptionID |
DIM_ID
OptionID for DIM_PARAM |
private IntParameter |
DIM_PARAM
Parameter for dimensionality. |
| 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, logger |
| Constructor Summary | |
|---|---|
DimensionSelectingDistanceFunction()
Constructor |
|
| Method Summary | |
|---|---|
DoubleDistance |
centerDistance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
Computes the distance between the centroids of the two given MBRs according to this distance function. |
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)
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 FeatureVector object with the given id according to this distance function. |
DoubleDistance |
minDist(HyperBoundingBox mbr,
V v)
Computes the minimum distance between the given MBR and the FeatureVector object according to this distance function. |
List<String> |
setParameters(List<String> args)
Grabs all specified options from the option handler. |
String |
shortDescription()
Returns a description of the class and the required 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, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, progress, 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, collectOptions, getParameters |
| Field Detail |
|---|
public static final OptionID DIM_ID
DIM_PARAM
private final IntParameter DIM_PARAM
private int dim
| Constructor Detail |
|---|
public DimensionSelectingDistanceFunction()
| Method Detail |
|---|
public DoubleDistance distance(V v1,
V v2)
distance in interface DistanceFunction<V extends FeatureVector<V,N>,DoubleDistance>v1 - first DatabaseObjectv2 - second DatabaseObject
public String shortDescription()
shortDescription in interface ParameterizableshortDescription in class AbstractMeasurementFunction<V extends FeatureVector<V,N>,DoubleDistance>
public DoubleDistance minDist(HyperBoundingBox mbr,
V v)
SpatialDistanceFunction
minDist in interface SpatialDistanceFunction<V extends FeatureVector<V,N>,DoubleDistance>mbr - the MBR objectv - the FeatureVector object
public DoubleDistance minDist(HyperBoundingBox mbr,
Integer id)
SpatialDistanceFunction
minDist in interface SpatialDistanceFunction<V extends FeatureVector<V,N>,DoubleDistance>mbr - the MBR objectid - the id of the FeatureVector object
public DoubleDistance distance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
SpatialDistanceFunction
distance in interface SpatialDistanceFunction<V extends FeatureVector<V,N>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR object
public DoubleDistance centerDistance(HyperBoundingBox mbr1,
HyperBoundingBox mbr2)
SpatialDistanceFunction
centerDistance in interface SpatialDistanceFunction<V extends FeatureVector<V,N>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR object
public List<String> setParameters(List<String> args)
throws ParameterException
AbstractParameterizable
{
List remainingParameters = super.setParameters(args);
// set parameters for your class
// for example like this:
if(isSet(MY_PARAM_VALUE_PARAM))
{
myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM);
}
.
.
.
return remainingParameters;
// or in case of attributes requesting parameters themselves
// return parameterizableAttribbute.setParameters(remainingParameters);
}
setParameters in interface ParameterizablesetParameters in class AbstractParameterizableargs - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-settingpublic int getSelectedDimension()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||