org.encog.mathutil
public final class EncogMath extends Object
Modifier and Type | Method and Description |
---|---|
static double |
deg2rad(double deg)
Convert degrees to radians.
|
static boolean |
doubleEquals(double d1,
double d2)
Determine if one double equals another, within the default percision.
|
static double |
factorial(int x)
Calculate x!.
|
static double |
hypot(double a,
double b)
sqrt(a^2 + b^2) without under/overflow.
|
static int |
maxIndex(double[] array)
Get the index to the greatest number in a double array.
|
static int |
minIndex(double[] array)
Get the index to the smallest number in a double array.
|
static double |
rad2deg(double rad)
Convert radians to degrees.
|
static int |
sign(double value)
Determine the sign of the value.
|
static double |
square(double d) |
static int |
thirds(double value)
Transform a number in the range (-1,1) to a tri-state value indicated by
-1, 0 or 1.
|
public static double deg2rad(double deg)
deg
- Degrees.public static boolean doubleEquals(double d1, double d2)
d1
- The first number.d2
- The second number.public static double hypot(double a, double b)
a
- First param.b
- Second param.public static int maxIndex(double[] array)
array
- The array to search.public static int minIndex(double[] array)
array
- The array to search.public static double rad2deg(double rad)
rad
- Radianspublic static double factorial(int x)
x
- The number to calculate for.public static double square(double d)
public static int sign(double value)
value
- The value to check.public static int thirds(double value)
value
- The value to consider.Copyright © 2014. All Rights Reserved.