@Priority(value=200) @Reference(authors="M.-M. Deza, E. Deza", title="Dictionary of distances", booktitle="Dictionary of distances", url="https://doi.org/10.1007/978-3-642-00234-2", bibkey="doi:10.1007/978-3-642-00234-2") public class ClarkDistanceFunction extends java.lang.Object implements SpatialPrimitiveDistanceFunction<NumberVector>, NumberVectorDistanceFunction<NumberVector>
Clark distance is defined as: \[ \text{Clark}(\vec{x},\vec{y}) := \sqrt{\tfrac{1}{d}\sum\nolimits_i \left(\tfrac{|x_i-y_i|}{|x_i|+|y_i|}\right)^2} \]
Reference:
M.-M. Deza, E. Deza
Dictionary of distances
Modifier and Type | Class and Description |
---|---|
static class |
ClarkDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static ClarkDistanceFunction |
STATIC
Static instance.
|
Constructor and Description |
---|
ClarkDistanceFunction()
Deprecated.
Use
STATIC instance instead. |
Modifier and Type | Method and Description |
---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
SimpleTypeInformation<? super NumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
hashCode() |
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
instantiate
isMetric, isSquared, isSymmetric
public static final ClarkDistanceFunction STATIC
@Deprecated public ClarkDistanceFunction()
STATIC
instance instead.public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.