de.lmu.ifi.dbs.elki.distance
Class DistanceUtil
java.lang.Object
de.lmu.ifi.dbs.elki.distance.DistanceUtil
public final class DistanceUtil
- extends Object
Class with distance related utility functions.
Method Summary |
static
|
max(D d1,
D d2)
Returns the maximum of the given Distances or the first, if none is greater
than the other one. |
static
|
min(D d1,
D d2)
Returns the minimum of the given Distances or the first, if none is less
than the other one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistanceUtil
public DistanceUtil()
max
public static <D extends Distance<D>> D max(D d1,
D d2)
- Returns the maximum of the given Distances or the first, if none is greater
than the other one.
- Type Parameters:
D
- distance type- Parameters:
d1
- first Distanced2
- second Distance
- Returns:
- Distance the maximum of the given Distances or the first, if
neither is greater than the other one
min
public static <D extends Distance<D>> D min(D d1,
D d2)
- Returns the minimum of the given Distances or the first, if none is less
than the other one.
- Type Parameters:
D
- distance type- Parameters:
d1
- first Distanced2
- second Distance
- Returns:
- Distance the minimum of the given Distances or the first, if
neither is less than the other one