@Alias(value={"euclidean","euclid","l2","EuclideanDistanceFunction","de.lmu.ifi.dbs.elki.distance.distancefunction.EuclideanDistanceFunction"}) public class EuclideanDistanceFunction extends LPIntegerNormDistanceFunction
NumberVector
s.Modifier and Type | Class and Description |
---|---|
static class |
EuclideanDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static EuclideanDistanceFunction |
STATIC
Static instance.
|
intp
invp, p
Constructor and Description |
---|
EuclideanDistanceFunction()
Deprecated.
Use static instance!
|
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(Object obj) |
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
double |
maxDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Maximum distance of two objects.
|
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
double |
norm(NumberVector v)
Compute the norm of object obj.
|
private double |
preDistance(NumberVector v1,
NumberVector v2,
int start,
int end,
double agg) |
private double |
preDistanceMBR(SpatialComparable mbr1,
SpatialComparable mbr2,
int start,
int end,
double agg) |
private double |
preDistanceVM(NumberVector v,
SpatialComparable mbr,
int start,
int end,
double agg) |
private double |
preNorm(NumberVector v,
int start,
int end,
double agg) |
private double |
preNormMBR(SpatialComparable mbr,
int start,
int end,
double agg) |
String |
toString() |
getInputTypeRestriction, getP
instantiate
dimensionality, dimensionality, dimensionality, dimensionality
isSymmetric
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isSymmetric
public static final EuclideanDistanceFunction STATIC
@Deprecated public EuclideanDistanceFunction()
STATIC
instead.private final double preDistance(NumberVector v1, NumberVector v2, int start, int end, double agg)
private final double preDistanceVM(NumberVector v, SpatialComparable mbr, int start, int end, double agg)
private final double preDistanceMBR(SpatialComparable mbr1, SpatialComparable mbr2, int start, int end, double agg)
private final double preNorm(NumberVector v, int start, int end, double agg)
private final double preNormMBR(SpatialComparable mbr, int start, int end, double agg)
public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
distance
in class LPIntegerNormDistanceFunction
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double norm(NumberVector v)
Norm
norm
in interface Norm<NumberVector>
norm
in class LPIntegerNormDistanceFunction
v
- Objectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
minDist
in class LPIntegerNormDistanceFunction
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic double maxDist(SpatialComparable mbr1, SpatialComparable mbr2)
mbr1
- First objectmbr2
- Second objectpublic boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector>
isMetric
in class LPNormDistanceFunction
true
when metric.public String toString()
toString
in class LPNormDistanceFunction
public boolean equals(Object obj)
equals
in class LPNormDistanceFunction
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.