public class MathUtils
extends java.lang.Object
Constructor and Description |
---|
MathUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
gcd(int a,
int b)
Calculate the greatest common denominator of two integers.
|
static double |
meanAbsoluteDeviation(double[] x)
Compute the mean absolute deviation from the mean.
|
static double |
meanAbsoluteDeviation(double[] x,
double mean)
Compute the mean absolute deviation from the mean.
|
static java.util.Iterator<int[]> |
permutationIterator(int n,
int k)
Iterator over all permutations of k choices of n integers.
|
static double[][] |
transpose(double[][] x)
Transpose a rectangular array
|
public static double[][] transpose(double[][] x)
x
- Array to transposepublic static int gcd(int a, int b)
a
- Integer #1b
- Integer #1public static double meanAbsoluteDeviation(double[] x, double mean)
x
- List of valuesmean
- Mean of xpublic static double meanAbsoluteDeviation(double[] x)
x
- List of valuespublic static java.util.Iterator<int[]> permutationIterator(int n, int k)
n
- Size of subsets from which permutations are selectedk
- Number of entries to select