Package elki.index.tree.spatial.kd
Class PartialSquaredEuclideanDistance
- java.lang.Object
-
- elki.index.tree.spatial.kd.PartialSquaredEuclideanDistance
-
- All Implemented Interfaces:
PartialDistance<NumberVector>
public class PartialSquaredEuclideanDistance extends java.lang.Object implements PartialDistance<NumberVector>
Partial distance computations for squared Euclidean distance.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static PartialSquaredEuclideanDistance
STATIC
Static instance
-
Constructor Summary
Constructors Modifier Constructor Description private
PartialSquaredEuclideanDistance()
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 PartialSquaredEuclideanDistance STATIC
Static instance
-
-
Constructor Detail
-
PartialSquaredEuclideanDistance
@Deprecated private PartialSquaredEuclideanDistance()
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
-
-