public class BasicMathFunctions extends Object
Constructor and Description |
---|
BasicMathFunctions() |
Modifier and Type | Method and Description |
---|---|
static int |
factorial(int n)
returns n!
|
static double |
getCombination(int k,
int n)
Returns the number of k-combinations in a set of n elements
|
static double |
mad(double[] ratios)
Method estimating the median absolute deviation
|
static double |
mean(ArrayList<Double> input)
Convenience method returning the mean of a list of doubles
|
static double |
median(ArrayList<Double> input)
Method to estimate the median
|
static double |
median(double[] ratios)
Method to estimate the median
|
static double |
std(ArrayList<Double> input)
Convenience method returning the standard deviation of a list of doubles.
|
public static int factorial(int n)
n
- a given integerpublic static double getCombination(int k, int n)
k
- the number of k-combinationsn
- the number of elementspublic static double median(double[] ratios)
ratios
- array of doublepublic static double median(ArrayList<Double> input)
input
- ArrayList of doublepublic static double mad(double[] ratios)
ratios
- array of doublespublic static double std(ArrayList<Double> input)
input
- input listCopyright © 2013. All Rights Reserved.