|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance> de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction de.lmu.ifi.dbs.elki.distance.distancefunction.LPNormDistanceFunction de.lmu.ifi.dbs.elki.distance.distancefunction.ManhattanDistanceFunction
public class ManhattanDistanceFunction
Manhattan distance function to compute the Manhattan distance for a pair of FeatureVectors.
Nested Class Summary | |
---|---|
static class |
ManhattanDistanceFunction.Parameterizer
Parameterization class. |
Field Summary | |
---|---|
static ManhattanDistanceFunction |
STATIC
The static instance to use. |
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.LPNormDistanceFunction |
---|
P_ID |
Constructor Summary | |
---|---|
ManhattanDistanceFunction()
Deprecated. Use static instance! |
Method Summary | ||
---|---|---|
DoubleDistance |
centerDistance(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the centroids of the two given MBRs 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)
Compute the Manhattan distance |
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance function. |
|
protected double |
doubleMinDistObject(SpatialComparable mbr,
NumberVector<?,?> v)
|
|
boolean |
equals(Object obj)
|
|
|
instantiate(Relation<T> relation)
Instantiate with a database to get the actual distance query. |
|
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the triangle equation?) |
|
DoubleDistance |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance function. |
|
String |
toString()
|
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.LPNormDistanceFunction |
---|
getP |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction |
---|
distance, getDistanceFactory, getInputTypeRestriction |
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction |
---|
isSymmetric |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.PrimitiveDistanceFunction |
---|
distance, getInputTypeRestriction |
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction |
---|
getDistanceFactory, isSymmetric |
Field Detail |
---|
public static final ManhattanDistanceFunction STATIC
Constructor Detail |
---|
@Deprecated public ManhattanDistanceFunction()
Method Detail |
---|
public double doubleDistance(NumberVector<?,?> v1, NumberVector<?,?> v2)
doubleDistance
in interface PrimitiveDoubleDistanceFunction<NumberVector<?,?>>
doubleDistance
in class LPNormDistanceFunction
v1
- first vectorv2
- second vector
protected double doubleMinDistObject(SpatialComparable mbr, NumberVector<?,?> v)
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 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 boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
isMetric
in class LPNormDistanceFunction
true
when metric.public <T extends NumberVector<?,?>> SpatialPrimitiveDistanceQuery<T,DoubleDistance> instantiate(Relation<T> relation)
AbstractPrimitiveDistanceFunction
instantiate
in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in interface SpatialPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
instantiate
in class AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
relation
- Representation
public String toString()
toString
in class LPNormDistanceFunction
public boolean equals(Object obj)
equals
in class LPNormDistanceFunction
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |