| Modifier and Type | Method and Description |
|---|---|
static java.math.BigDecimal[] |
cumprod(double[] in)
Returns the cumulative sum for a double[] as a
BigDecimal |
static java.math.BigDecimal[] |
cumsum(double[] in)
Returns the cumulative sum for a double[] as a
BigDecimal |
static java.math.BigDecimal |
dot(double[] in1,
double[] in2) |
static java.math.BigDecimal |
factorial(java.math.BigDecimal n)
Returns the factorial as a BigDecimal.
|
static java.math.BigDecimal |
factorial(long n)
Returns the factorial as a BigDecimal.
|
static java.util.LinkedHashMap |
getFactorialTable() |
static java.math.BigDecimal |
mean(double[] in)
Returns the sumsq for a double[].
|
static java.math.BigDecimal |
nCk(java.math.BigDecimal n,
java.math.BigDecimal k)
Accurately returns the binomial (N choose K) as a BigDecimal
|
static java.math.BigDecimal |
nCk(int n,
int k)
Accurately returns the binomial (N choose K) as a BigDecimal
|
static java.math.BigDecimal |
nCk(long n,
long k)
Accurately returns the binomial (N choose K) as a BigDecimal
|
static void |
reset()
Resets the internal hashmaps - thus freeing memory
|
static java.math.BigDecimal |
sum(double[] in)
Returns the sum for a double[].
|
static java.math.BigDecimal |
sumsq(double[] in)
Returns the sum of squares for a double[] accumulated as a
BigDecimal |
public static java.math.BigDecimal sum(double[] in)
BigDecimalin - public static java.math.BigDecimal[] cumsum(double[] in)
BigDecimalin - public static java.math.BigDecimal[] cumprod(double[] in)
BigDecimalin - public static java.math.BigDecimal sumsq(double[] in)
BigDecimalin - BigDecimalpublic static java.math.BigDecimal dot(double[] in1,
double[] in2)
public static java.math.BigDecimal mean(double[] in)
BigDecimal but returned as doublein - public static void reset()
public static java.util.LinkedHashMap getFactorialTable()
public static java.math.BigDecimal factorial(long n)
n less than 0 returns
null. For n=0,1 returns 1. Otherwise returns n!. Once calculated,
values of n and n! are stored in a HashMap. Subsequent calls with input n
will return the stored value of n!.n - - type longpublic static java.math.BigDecimal factorial(java.math.BigDecimal n)
n less than 0 returns
null. For n=0,1 returns 1. Otherwise returns n! Once calculated,
values of n and n! are stored in a HashMap. Subsequent calls with input n
will return the stored value of n!.n - - type BigDecimalpublic static java.math.BigDecimal nCk(int n,
int k)
Accurately returns the binomial (N choose K) as a BigDecimal
For k< 0, return ZERO
For k==0 or k ==n return ONE
For k==1 return n
Otherwise returns
n!/((n*k)! k!)
n - - intk - - intn!/((n*k)! k!)as a BigDecimal
public static java.math.BigDecimal nCk(long n,
long k)
Accurately returns the binomial (N choose K) as a BigDecimal
For k< 0, return ZERO
For k==0 or k ==n return ONE
For k==1 return n
Otherwise returns
n!/((n*k)! k!)
n - - longk - - longn!/((n*k)! k!)as a BigDecimal
public static java.math.BigDecimal nCk(java.math.BigDecimal n,
java.math.BigDecimal k)
Accurately returns the binomial (N choose K) as a BigDecimal
For k< 0, return ZERO
For k==0 or k ==n return ONE
For k==1 return n
Otherwise returns
n!/((n*k)! k!)
n - - BigDecimalk - - BigDecimaln!/((n*k)! k!)as a BigDecimal