de.lmu.ifi.dbs.elki.math
Class MathUtil
java.lang.Object
de.lmu.ifi.dbs.elki.math.MathUtil
public class MathUtil
- extends Object
A collection of math related utility functions.
Method Summary |
static double |
hypotenuse(double a,
double b)
Computes the square root of the sum of the squared arguments
without under or overflow. |
static double |
mahalanobisDistance(Matrix weightMatrix,
Vector o1_minus_o2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathUtil
public MathUtil()
hypotenuse
public static double hypotenuse(double a,
double b)
- Computes the square root of the sum of the squared arguments
without under or overflow.
- Parameters:
a
- first cathetusb
- second cathetus
- Returns:
sqrt(a<sup>2</sup> + b<sup>2</sup>)
mahalanobisDistance
public static double mahalanobisDistance(Matrix weightMatrix,
Vector o1_minus_o2)