Package: org.arl.unet.utils

[Java] Class MathUtils

• org.arl.unet.utils.MathUtils
• Math utilities.

• Methods Summary

Methods
Type Params Return Type Name and description
`static double` `distance(double[] p1, double[] p2)`
Computes the distance between two points.
`static double` `erf(double x)`
Error function.
`static double` `erfc(double x)`
Complementary error function.
`static double` `erfcinv(double x)`
Inverse complementary error function.
`static double` `erfinv(double x)`
Inverse error function.
• Inherited Methods Summary

Inherited Methods
Methods inherited from class Name
`class Object` `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`
• Method Detail

• public static double distance(double[] p1, double[] p2)

Computes the distance between two points. If the dimensions of p1 and p2 are unequal, this method returns a NaN.

Parameters:
`p1` - coordinates of point 1
`p2` - coordinates of point 2
Returns:
distance between the points

• public static double erf(double x)

Error function. Approximation based on Press et al, Numerical Recipes in Fortran 77: The Art of Scientific Computing (1992), p214.

Parameters:
`x` - real argument
Returns:
value of the error function

• public static double erfc(double x)

Complementary error function. Approximation based on Press et al, Numerical Recipes in Fortran 77: The Art of Scientific Computing (1992), p214.

Parameters:
`x` - real argument
Returns:
value of the complementary error function

• public static double erfcinv(double x)

Inverse complementary error function. Approximation based on Giles (2010).

Parameters:
`x` - argument between 0 and 2
Returns:
value of the inverse complementary error function

• public static double erfinv(double x)

Inverse error function. Approximation based on Giles (2010).

Parameters:
`x` - argument between -1 and 1
Returns:
value of the inverse error function