Package elki.index.tree.spatial.kd
Class PartialManhattanDistance
- java.lang.Object
-
- elki.index.tree.spatial.kd.PartialManhattanDistance
-
- All Implemented Interfaces:
PartialDistance<NumberVector>
public class PartialManhattanDistance 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 PartialManhattanDistance
STATIC
Static instance
-
Constructor Summary
Constructors Modifier Constructor Description private
PartialManhattanDistance()
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 PartialManhattanDistance STATIC
Static instance
-
-
Constructor Detail
-
PartialManhattanDistance
@Deprecated private PartialManhattanDistance()
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
-
-