|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.DimensionSelectingDistanceFunction
public class DimensionSelectingDistanceFunction

Provides a distance function that computes the distance between feature vectors as the absolute difference of their values in a specified dimension.
| Nested Class Summary | |
|---|---|
static class |
DimensionSelectingDistanceFunction.Parameterizer
Parameterization class. |
| Field Summary | |
|---|---|
private int |
dim
The dimension to be considered for distance computation. |
static OptionID |
DIM_ID
Parameter for dimensionality. |
| Constructor Summary | |
|---|---|
DimensionSelectingDistanceFunction(int dim)
Constructor. |
|
| Method Summary | ||
|---|---|---|
DoubleDistance |
centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs according to this distance function. |
|
DoubleDistance |
distance(NumberVector<?,?> o1,
NumberVector<?,?> o2)
Computes the distance between two given DatabaseObjects according to this distance function. |
|
double |
doubleCenterDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs according to this distance function. |
|
double |
doubleDistance(NumberVector<?,?> v1,
NumberVector<?,?> v2)
Computes the distance between two given DatabaseObjects according to this distance function. |
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance function. |
|
boolean |
equals(Object obj)
|
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory. |
|
VectorTypeInformation<? super NumberVector<?,?>> |
getInputTypeRestriction()
Get the input data type of the function. |
|
int |
getSelectedDimension()
Returns the selected dimension. |
|
|
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query. |
|
DoubleDistance |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance function. |
|
| Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction |
|---|
isMetric, isSymmetric |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction |
|---|
isMetric, isSymmetric |
| Field Detail |
|---|
public static final OptionID DIM_ID
private int dim
| Constructor Detail |
|---|
public DimensionSelectingDistanceFunction(int dim)
dim - Dimension| Method Detail |
|---|
public double doubleDistance(NumberVector<?,?> v1,
NumberVector<?,?> v2)
doubleDistance in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>v1 - first DatabaseObjectv2 - second DatabaseObject
public double doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleMinDist in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>mbr1 - the first MBR objectmbr2 - the second MBR object
public double doubleCenterDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunction
doubleCenterDistance in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?,?>>mbr1 - the first MBR objectmbr2 - the second MBR object
public DoubleDistance distance(NumberVector<?,?> o1,
NumberVector<?,?> o2)
PrimitiveDistanceFunction
distance in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>distance in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>o1 - first DatabaseObjecto2 - second DatabaseObject
public DoubleDistance minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR object
public DoubleDistance centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
centerDistance in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>mbr1 - the first MBR objectmbr2 - the second MBR object
public int getSelectedDimension()
public VectorTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>public DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>getDistanceFactory in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>public <T extends NumberVector<?,?>> SpatialPrimitiveDistanceQuery<T,DoubleDistance> instantiate(Relation<T> database)
AbstractPrimitiveDistanceFunction
instantiate in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>instantiate in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>instantiate in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>database - Representation
public boolean equals(Object obj)
equals in class Object
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||