|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.MyMath
public final class MyMath
some math related static functions including some useful statistics functions
| Field Summary | |
|---|---|
double |
FIB
the neares quotient of Fibonacci numbers as double |
| Method Summary | |
|---|---|
static double |
average(double... population)
returns mean(population) |
static double |
centimeterToInch(double centimeter)
just for convenient reference |
static double |
inchToCentimeter(double inch)
just for convenient reference |
static double |
max(double... value)
returns the greatest element out of the given array |
static long |
max(long... value)
returns the greatest element out of the given array |
static double |
maxIndex(double... value)
returns the index of the greatest element from the given array |
static double |
mean(double... population)
returns the mean of the population |
static double |
median(double... population)
returns the median of the given population |
static double |
min(double... value)
returns the smallest element out of the given array |
static double |
minIndex(double... value)
returns the index of the smallest element from the given array |
static double |
range(double... population)
returns the difference between the max and the min element |
static double |
sigmoid(double x)
produces a double between 0 and 1 with (sigmoid(0.5) == 0)
being true |
static double |
sigmoid(double x,
double flatteningFactor)
sigmoid(double x) is the same as sigmoid(double x, 1),
large flatteningFactor flattens the curve |
static double |
softmax(int index,
double... x)
produces a double between 0 and 1 based on the given array x and the index that must be between (0 and x.length) For further information see also: http://www-ccs.ucsd.edu/matlab/toolbox/nnet/softmax.html |
static double |
standardDeviation(double... population)
returns the standard deviation of the given population based on variance() |
static double |
stdDev(double... sample)
returns the standard deviation of the given sample based on var() |
static double |
sum(double... population)
returns the sum of the given population |
static int |
sumOfDigits(long number)
returns the sum of all individual digits. |
static double |
var(double... sample)
returns the variance of the given sample of a population |
static double |
variance(double... population)
returns the variance of the given population |
static double |
YardToMeter(double yard)
just for convenient reference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double FIB
| Method Detail |
|---|
public static int sumOfDigits(long number)
sumOfDigits(123045) returns 15
(1+2+3+4+0+5).
public static double average(double... population)
mean(double[])public static double mean(double... population)
public static double sum(double... population)
public static double range(double... population)
public static double median(double... population)
public static double variance(double... population)
public static double var(double... sample)
public static double standardDeviation(double... population)
variance(double[] population)public static double stdDev(double... sample)
var(double[])public static double max(double... value)
public static long max(long... value)
public static double maxIndex(double... value)
public static double min(double... value)
public static double minIndex(double... value)
public static double sigmoid(double x)
(sigmoid(0.5) == 0)
being true
public static double sigmoid(double x,
double flatteningFactor)
sigmoid(double x) is the same as sigmoid(double x, 1),
large flatteningFactor flattens the curve
public static double softmax(int index,
double... x)
public static double centimeterToInch(double centimeter)
public static double inchToCentimeter(double inch)
public static double YardToMeter(double yard)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||