Package elki.index.tree.spatial.kd
Class PartialEuclideanDistance
- java.lang.Object
-
- elki.index.tree.spatial.kd.PartialEuclideanDistance
-
- All Implemented Interfaces:
PartialDistance<NumberVector>
public class PartialEuclideanDistance extends java.lang.Object implements PartialDistance<NumberVector>
Partial distance computations for Euclidean distance.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static PartialEuclideanDistance
STATIC
Static instance
-
Constructor Summary
Constructors Modifier Constructor Description private
PartialEuclideanDistance()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
combineRaw(double rawdist, double delta, double prevdelta)
Combine the distance information.boolean
compareRawRegular(double raw, double reg)
Check if a "raw" distance is less or equal a regular distance.double
distance(NumberVector a, NumberVector b)
Compute the actual distance of two objects.double
transformOut(double rawdist)
Transform a raw distance to an output (external) distance.
-
-
-
Field Detail
-
STATIC
public static final PartialEuclideanDistance STATIC
Static instance
-
-
Constructor Detail
-
PartialEuclideanDistance
@Deprecated private PartialEuclideanDistance()
Deprecated.Constructor. UseSTATIC
instead.
-
-
Method Detail
-
combineRaw
public double combineRaw(double rawdist, double delta, double prevdelta)
Description copied from interface:PartialDistance
Combine the distance information.- Specified by:
combineRaw
in interfacePartialDistance<NumberVector>
- Parameters:
rawdist
- Raw (often squared) previous distancedelta
- New deltaprevdelta
- Previous delta- Returns:
- New raw distance
-
compareRawRegular
public boolean compareRawRegular(double raw, double reg)
Description copied from interface:PartialDistance
Check if a "raw" distance is less or equal a regular distance.- Specified by:
compareRawRegular
in interfacePartialDistance<NumberVector>
- Parameters:
raw
- Raw distance (usually squared)reg
- Regular distance- Returns:
- True if less than or equal
-
distance
public double distance(NumberVector a, NumberVector b)
Description copied from interface:PartialDistance
Compute the actual distance of two objects.- Specified by:
distance
in interfacePartialDistance<NumberVector>
- Parameters:
a
- Firstb
- Second- Returns:
- Distance
-
transformOut
public double transformOut(double rawdist)
Description copied from interface:PartialDistance
Transform a raw distance to an output (external) distance.- Specified by:
transformOut
in interfacePartialDistance<NumberVector>
- Parameters:
rawdist
- Raw distance- Returns:
- External distance
-
-