de.lmu.ifi.dbs.elki.distance
Class DistanceUtil

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.DistanceUtil

public final class DistanceUtil
extends Object

Class with distance related utility functions.


Constructor Summary
DistanceUtil()
           
 
Method Summary
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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceUtil

public DistanceUtil()
Method Detail

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 Distance
d2 - 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 Distance
d2 - second Distance
Returns:
Distance the minimum of the given Distances or the first, if neither is less than the other one

Release 0.4.0 (2011-09-20_1324)