|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.croftsoft.core.math.MathLib
public final class MathLib
A collection of static methods to supplement java.lang.Math.
Method Summary | |
---|---|
static double |
clip(double value,
double minimum,
double maximum)
|
static double |
cumulative(double x)
return cumulative ( x, 1 ); |
static double |
cumulative(double x,
double lambda)
Cumulative Distribution Function (CDF). |
static List<Integer> |
factor(int n)
|
static int |
greatestCommonFactor(int n0,
int n1)
|
static double |
log(double a,
double base)
Calculates the logarithm in the given base. |
static void |
main(String[] args)
|
static double |
sigmoid(double a)
Also known as the "logistic function". |
static double |
sigmoidDerivative(double a)
The derivative with respect to the argument. |
static byte |
signum(long l)
Returns +1 if positive, -1 if negative, otherwise 0. |
static double |
tanh(double a)
hyperbolic tangent = 2 * sigmoid ( 2 * a ) - 1 |
static boolean |
test()
|
static Point2D |
toRectangular(double radius,
double angle)
Converts from polar to rectangular coordinates. |
static void |
toRectangular(double radius,
double angle,
Point2D point2D)
Converts from polar to rectangular coordinates. |
static double |
wrap(double value,
double minimum,
double range)
Wraps the value to [minimum, minimum + range). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(String[] args)
public static boolean test()
public static double clip(double value, double minimum, double maximum)
public static double cumulative(double x, double lambda)
#Cumulative_distribution_function
public static double cumulative(double x)
public static List<Integer> factor(int n)
public static int greatestCommonFactor(int n0, int n1)
public static double log(double a, double base)
return Math.log ( a ) / Math.log ( base );
public static double sigmoid(double a)
public static double sigmoidDerivative(double a)
public static byte signum(long l)
public static double tanh(double a)
public static void toRectangular(double radius, double angle, Point2D point2D)
public static Point2D toRectangular(double radius, double angle)
public static double wrap(double value, double minimum, double range)
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |