Package elki.index.tree.spatial.kd
Interface PartialDistance<O>
-
- All Known Implementing Classes:
PartialEuclideanDistance
,PartialLPNormDistance
,PartialManhattanDistance
,PartialSquaredEuclideanDistance
public interface PartialDistance<O>
Interface to maintain partial distance bounds.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract 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(O a, O b)
Compute the actual distance of two objects.double
transformOut(double rawdist)
Transform a raw distance to an output (external) distance.
-
-
-
Method Detail
-
combineRaw
double combineRaw(double rawdist, double delta, double prevdelta)
Combine the distance information.- Parameters:
rawdist
- Raw (often squared) previous distancedelta
- New deltaprevdelta
- Previous delta- Returns:
- New raw distance
-
compareRawRegular
boolean compareRawRegular(double raw, double reg)
Check if a "raw" distance is less or equal a regular distance.- Parameters:
raw
- Raw distance (usually squared)reg
- Regular distance- Returns:
- True if less than or equal
-
distance
double distance(O a, O b)
Compute the actual distance of two objects.- Parameters:
a
- Firstb
- Second- Returns:
- Distance
-
transformOut
double transformOut(double rawdist)
Transform a raw distance to an output (external) distance.- Parameters:
rawdist
- Raw distance- Returns:
- External distance
-
-