public class ArrayMath extends java.lang.Object
Constructor and Description |
---|
ArrayMath() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
abs(byte[] input,
boolean overwrite)
Computes the absolute value of each value of the given byte array
|
static double[] |
abs(double[] input,
boolean overwrite)
Computes the absolute value of each value of the given double array
|
static float[] |
abs(float[] input,
boolean overwrite)
Computes the absolute value of each value of the given float array
|
static int[] |
abs(int[] input,
boolean overwrite)
Computes the absolute value of each value of the given int array
|
static long[] |
abs(long[] input,
boolean overwrite)
Computes the absolute value of each value of the given long array
|
static java.lang.Object |
abs(java.lang.Object array,
boolean overwrite)
Computes the absolute value of each value of the given array
|
static short[] |
abs(short[] input,
boolean overwrite)
Computes the absolute value of each value of the given short array
|
static byte[] |
add(byte[] array,
byte value)
Adds a value to all elements of the given byte array
|
static byte[] |
add(byte[] a1,
byte[] a2)
Element-wise addition of two byte arrays
|
static byte[] |
add(byte[] a1,
byte[] a2,
byte[] out)
Element-wise addition of two byte arrays (result in output if defined)
|
static byte[] |
add(byte[] array,
byte value,
byte[] out)
Adds a value to all elements of the given byte array
|
static double[] |
add(double[] array,
double value)
Adds a value to all elements of the given double array
|
static double[] |
add(double[] a1,
double[] a2)
Element-wise addition of two double arrays
|
static double[] |
add(double[] a1,
double[] a2,
double[] out)
Element-wise addition of two double arrays (result in output if defined)
|
static double[] |
add(double[] array,
double value,
double[] out)
Adds a value to all elements of the given double array
|
static double[] |
add(double value,
double[] array,
double[] out)
Deprecated.
use
add(double[] , double , double[]) instead |
static float[] |
add(float[] array,
float value)
Adds a value to all elements of the float given array
|
static float[] |
add(float[] a1,
float[] a2)
Element-wise addition of two float arrays
|
static float[] |
add(float[] a1,
float[] a2,
float[] out)
Element-wise addition of two float arrays (result in output if defined)
|
static float[] |
add(float[] array,
float value,
float[] out)
Adds a value to all elements of the given float array
|
static int[] |
add(int[] array,
int value)
Adds a value to all elements of the given int array
|
static int[] |
add(int[] a1,
int[] a2)
Element-wise addition of two int arrays
|
static int[] |
add(int[] a1,
int[] a2,
int[] out)
Element-wise addition of two int arrays (result in output if defined)
|
static int[] |
add(int[] array,
int value,
int[] out)
Adds a value to all elements of the given int array
|
static long[] |
add(long[] array,
long value)
Adds a value to all elements of the given long array
|
static long[] |
add(long[] a1,
long[] a2)
Element-wise addition of two long arrays
|
static long[] |
add(long[] a1,
long[] a2,
long[] out)
Element-wise addition of two long arrays (result in output if defined)
|
static long[] |
add(long[] array,
long value,
long[] out)
Adds a value to all elements of the given long array
|
static java.lang.Object |
add(java.lang.Object array,
java.lang.Number value)
Adds a value to all elements of the given array
|
static java.lang.Object |
add(java.lang.Object array,
java.lang.Number value,
java.lang.Object out)
Adds a value to all elements of the given array
|
static java.lang.Object |
add(java.lang.Object a1,
java.lang.Object a2)
Element-wise addition of two arrays
|
static java.lang.Object |
add(java.lang.Object a1,
java.lang.Object a2,
java.lang.Object out)
Element-wise addition of two arrays
|
static short[] |
add(short[] array,
short value)
Adds a value to all elements of the given short array
|
static short[] |
add(short[] a1,
short[] a2)
Element-wise addition of two short arrays
|
static short[] |
add(short[] a1,
short[] a2,
short[] out)
Element-wise addition of two short arrays (result in output if defined)
|
static short[] |
add(short[] array,
short value,
short[] out)
Adds a value to all elements of the given short array
|
static double |
correlation(double[] a,
double[] b)
Computes the classical correlation coefficient between 2 populations.
|
static double |
correlationPearson(double[] a,
double[] b)
Computes the Pearson correlation coefficient between two populations of same size N.
|
static byte[] |
divide(byte[] array,
byte value)
Divides a value to all elements of the given byte array
|
static byte[] |
divide(byte[] a1,
byte[] a2)
Element-wise division of two byte arrays
|
static byte[] |
divide(byte[] a1,
byte[] a2,
byte[] out)
Element-wise division of two byte arrays (result in output if defined)
|
static byte[] |
divide(byte[] array,
byte value,
byte[] out)
Divides a value to all elements of the given byte array
|
static byte[] |
divide(byte value,
byte[] array)
Divides a value by all elements of the given byte array
|
static byte[] |
divide(byte value,
byte[] array,
byte[] out)
Divides a value by all elements of the given byte array
|
static double[] |
divide(double[] array,
double value)
Divides a value to all elements of the given double array
|
static double[] |
divide(double[] a1,
double[] a2)
Element-wise division of two double arrays
|
static double[] |
divide(double[] a1,
double[] a2,
double[] out)
Element-wise division of two double arrays (result in output if defined)
|
static double[] |
divide(double[] array,
double value,
double[] out)
Divides a value to all elements of the given double array
|
static double[] |
divide(double value,
double[] array)
Divides a value by all elements of the given double array
|
static double[] |
divide(double value,
double[] array,
double[] out)
Subtracts a value by all elements of the given double array
|
static float[] |
divide(float[] array,
float value)
Divides a value to all elements of the float given array
|
static float[] |
divide(float[] a1,
float[] a2)
Element-wise division of two float arrays
|
static float[] |
divide(float[] a1,
float[] a2,
float[] out)
Element-wise division of two float arrays (result in output if defined)
|
static float[] |
divide(float[] array,
float value,
float[] out)
Divides a value to all elements of the given float array
|
static float[] |
divide(float value,
float[] array)
Divides a value by all elements of the float given array
|
static float[] |
divide(float value,
float[] array,
float[] out)
Divides a value by all elements of the given float array
|
static int[] |
divide(int[] array,
int value)
Divides a value to all elements of the given int array
|
static int[] |
divide(int[] a1,
int[] a2)
Element-wise division of two int arrays
|
static int[] |
divide(int[] a1,
int[] a2,
int[] out)
Element-wise division of two int arrays (result in output if defined)
|
static int[] |
divide(int[] array,
int value,
int[] out)
Divides a value to all elements of the given int array
|
static int[] |
divide(int value,
int[] array)
Divides a value by all elements of the given int array
|
static int[] |
divide(int value,
int[] array,
int[] out)
Divides a value by all elements of the given int array
|
static long[] |
divide(long[] array,
long value)
Divides a value to all elements of the given long array
|
static long[] |
divide(long[] a1,
long[] a2)
Element-wise division of two long arrays
|
static long[] |
divide(long[] a1,
long[] a2,
long[] out)
Element-wise division of two long arrays (result in output if defined)
|
static long[] |
divide(long[] array,
long value,
long[] out)
Divides a value to all elements of the given long array
|
static long[] |
divide(long value,
long[] array)
Divides a value by all elements of the given long array
|
static long[] |
divide(long value,
long[] array,
long[] out)
Divides a value by all elements of the given long array
|
static java.lang.Object |
divide(java.lang.Number value,
java.lang.Object array)
Divides a value by all elements of the given array
|
static java.lang.Object |
divide(java.lang.Number value,
java.lang.Object array,
java.lang.Object out)
Divides a value by all elements of the given array
|
static java.lang.Object |
divide(java.lang.Object array,
java.lang.Number value)
Divides a value to all elements of the given array
|
static java.lang.Object |
divide(java.lang.Object array,
java.lang.Number value,
java.lang.Object out)
Divides a value to all elements of the given array
|
static java.lang.Object |
divide(java.lang.Object a1,
java.lang.Object a2)
Element-wise division of two arrays
|
static java.lang.Object |
divide(java.lang.Object a1,
java.lang.Object a2,
java.lang.Object out)
Element-wise division of two arrays
|
static short[] |
divide(short[] array,
short value)
Divides a value to all elements of the given short array
|
static short[] |
divide(short[] a1,
short[] a2)
Element-wise division of two short arrays
|
static short[] |
divide(short[] a1,
short[] a2,
short[] out)
Element-wise division of two short arrays (result in output if defined)
|
static short[] |
divide(short[] array,
short value,
short[] out)
Divides a value to all elements of the given short array
|
static short[] |
divide(short value,
short[] array)
Divides a value by all elements of the given short array
|
static short[] |
divide(short value,
short[] array,
short[] out)
Divides a value by all elements of the given short array
|
static double |
mad(double[] input,
boolean normalPopulation)
Computes the Maximum Absolute Deviation aka MAD of the given array
|
static int |
max(byte[] array,
boolean signed)
Find the maximum value of an array
|
static double |
max(double[] array)
Find the maximum value of an array
|
static double[] |
max(double[] a1,
double[] a2)
Element-wise maximum of two arrays
|
static void |
max(double[] a1,
double[] a2,
double[] output)
Element-wise maximum of two arrays
|
static float |
max(float[] array)
Find the maximum value of an array
|
static long |
max(int[] array,
boolean signed)
Find the maximum value of an array
|
static long |
max(long[] array,
boolean signed)
Find the maximum value of an array
|
static double |
max(java.lang.Object array,
boolean signed)
Find the maximum value of a generic array
|
static int |
max(short[] array,
boolean signed)
Find the maximum value of an array
|
static double |
mean(double[] input)
Computes the mean value of the given array
|
static double |
median(double[] input,
boolean preserveData)
Reorders the given array to compute its median value
|
static int |
min(byte[] array,
boolean signed)
Find the minimum value of an array
|
static double |
min(double[] array)
Find the minimum value of an array
|
static double[] |
min(double[] a1,
double[] a2)
Element-wise minimum of two arrays
|
static void |
min(double[] a1,
double[] a2,
double[] output)
Element-wise minimum of two arrays
|
static float |
min(float[] array)
Find the minimum value of an array
|
static long |
min(int[] array,
boolean signed)
Find the minimum value of an array
|
static long |
min(long[] array,
boolean signed)
Find the minimum value of an array
|
static double |
min(java.lang.Object array,
boolean signed)
Find the minimum value of a generic array
|
static int |
min(short[] array,
boolean signed)
Find the minimum value of an array
|
static byte[] |
multiply(byte[] array,
byte value)
Multiplies a value to all elements of the given byte array
|
static byte[] |
multiply(byte[] a1,
byte[] a2)
Element-wise multiplication of two byte arrays
|
static byte[] |
multiply(byte[] a1,
byte[] a2,
byte[] out)
Element-wise multiplication of two byte arrays (result in output if defined)
|
static byte[] |
multiply(byte[] array,
byte value,
byte[] out)
Multiplies a value to all elements of the given byte array
|
static double[] |
multiply(double[] array,
double value)
Multiplies a value to all elements of the given double array
|
static double[] |
multiply(double[] a1,
double[] a2)
Element-wise multiplication of two double arrays
|
static double[] |
multiply(double[] a1,
double[] a2,
double[] out)
Element-wise multiplication of two double arrays (result in output if defined)
|
static double[] |
multiply(double[] array,
double value,
double[] out)
Multiplies a value to all elements of the given double array
|
static double[] |
multiply(double value,
double[] array,
double[] out)
Deprecated.
use
multiply(double[] , double , double[]) instead |
static float[] |
multiply(float[] array,
float value)
Multiplies a value to all elements of the float given array
|
static float[] |
multiply(float[] a1,
float[] a2)
Element-wise multiplication of two float arrays
|
static float[] |
multiply(float[] a1,
float[] a2,
float[] out)
Element-wise multiplication of two float arrays (result in output if defined)
|
static float[] |
multiply(float[] array,
float value,
float[] out)
Multiplies a value to all elements of the given float array
|
static int[] |
multiply(int[] array,
int value)
Multiplies a value to all elements of the given int array
|
static int[] |
multiply(int[] a1,
int[] a2)
Element-wise multiplication of two int arrays
|
static int[] |
multiply(int[] a1,
int[] a2,
int[] out)
Element-wise multiplication of two int arrays (result in output if defined)
|
static int[] |
multiply(int[] array,
int value,
int[] out)
Multiplies a value to all elements of the given int array
|
static long[] |
multiply(long[] array,
long value)
Multiplies a value to all elements of the given long array
|
static long[] |
multiply(long[] a1,
long[] a2)
Element-wise multiplication of two long arrays
|
static long[] |
multiply(long[] a1,
long[] a2,
long[] out)
Element-wise multiplication of two long arrays (result in output if defined)
|
static long[] |
multiply(long[] array,
long value,
long[] out)
Multiplies a value to all elements of the given long array
|
static java.lang.Object |
multiply(java.lang.Object array,
java.lang.Number value)
Multiplies a value to all elements of the given array
|
static java.lang.Object |
multiply(java.lang.Object array,
java.lang.Number value,
java.lang.Object out)
Multiplies a value to all elements of the given array
|
static java.lang.Object |
multiply(java.lang.Object a1,
java.lang.Object a2)
Element-wise multiplication of two arrays
|
static java.lang.Object |
multiply(java.lang.Object a1,
java.lang.Object a2,
java.lang.Object out)
Element-wise multiplication of two arrays
|
static short[] |
multiply(short[] array,
short value)
Multiplies a value to all elements of the given short array
|
static short[] |
multiply(short[] a1,
short[] a2)
Element-wise multiplication of two short arrays
|
static short[] |
multiply(short[] a1,
short[] a2,
short[] out)
Element-wise multiplication of two short arrays (result in output if defined)
|
static short[] |
multiply(short[] array,
short value,
short[] out)
Multiplies a value to all elements of the given short array
|
static double[] |
rescale(double[] input,
double newMin,
double newMax,
boolean overwrite)
Rescales the given array to [newMin,newMax].
|
static double |
select(int k,
double[] data)
(routine ported from 'Numerical Recipes in C 2nd ed.')
|
static double[] |
standardize(double[] input,
boolean overwrite)
Standardize the input data by subtracting the mean value and dividing by the standard
deviation
|
static double |
std(double[] input,
boolean unbiased)
Computes the standard deviation of the given array (the variance square root)
|
static byte[] |
subtract(byte[] array,
byte value)
Subtracts a value to all elements of the given byte array
|
static byte[] |
subtract(byte[] a1,
byte[] a2)
Element-wise subtraction of two byte arrays
|
static byte[] |
subtract(byte[] a1,
byte[] a2,
byte[] out)
Element-wise subtraction of two byte arrays (result in output if defined)
|
static byte[] |
subtract(byte[] array,
byte value,
byte[] out)
Subtracts a value to all elements of the given byte array
|
static byte[] |
subtract(byte value,
byte[] array)
Subtracts a value by all elements of the given byte array
|
static byte[] |
subtract(byte value,
byte[] array,
byte[] out)
Subtracts a value by all elements of the given byte array
|
static double[] |
subtract(double[] array,
double value)
Subtracts a value to all elements of the given double array
|
static double[] |
subtract(double[] a1,
double[] a2)
Element-wise subtraction of two double arrays
|
static double[] |
subtract(double[] a1,
double[] a2,
double[] out)
Element-wise subtraction of two double arrays (result in output if defined)
|
static double[] |
subtract(double[] array,
double value,
double[] out)
Subtracts a value to all elements of the given double array
|
static double[] |
subtract(double value,
double[] array)
Subtracts a value by all elements of the given double array
|
static double[] |
subtract(double value,
double[] array,
double[] out)
Subtracts a value by all elements of the given double array
|
static float[] |
subtract(float[] array,
float value)
Subtracts a value to all elements of the float given array
|
static float[] |
subtract(float[] a1,
float[] a2)
Element-wise subtraction of two float arrays
|
static float[] |
subtract(float[] a1,
float[] a2,
float[] out)
Element-wise subtraction of two float arrays (result in output if defined)
|
static float[] |
subtract(float[] array,
float value,
float[] out)
Subtracts a value to all elements of the given float array
|
static float[] |
subtract(float value,
float[] array)
Subtracts a value by all elements of the float given array
|
static float[] |
subtract(float value,
float[] array,
float[] out)
Subtracts a value by all elements of the given float array
|
static int[] |
subtract(int[] array,
int value)
Subtracts a value to all elements of the given int array
|
static int[] |
subtract(int[] a1,
int[] a2)
Element-wise subtraction of two int arrays
|
static int[] |
subtract(int[] a1,
int[] a2,
int[] out)
Element-wise subtraction of two int arrays (result in output if defined)
|
static int[] |
subtract(int[] array,
int value,
int[] out)
Subtracts a value to all elements of the given int array
|
static int[] |
subtract(int value,
int[] array)
Subtracts a value by all elements of the given int array
|
static int[] |
subtract(int value,
int[] array,
int[] out)
Subtracts a value by all elements of the given int array
|
static long[] |
subtract(long[] array,
long value)
Subtracts a value to all elements of the given long array
|
static long[] |
subtract(long[] a1,
long[] a2)
Element-wise subtraction of two long arrays
|
static long[] |
subtract(long[] a1,
long[] a2,
long[] out)
Element-wise subtraction of two long arrays (result in output if defined)
|
static long[] |
subtract(long[] array,
long value,
long[] out)
Subtracts a value to all elements of the given long array
|
static long[] |
subtract(long value,
long[] array)
Subtracts a value by all elements of the given long array
|
static long[] |
subtract(long value,
long[] array,
long[] out)
Subtracts a value by all elements of the given long array
|
static java.lang.Object |
subtract(java.lang.Number value,
java.lang.Object array)
Subtracts a value by all elements of the given array
|
static java.lang.Object |
subtract(java.lang.Number value,
java.lang.Object array,
java.lang.Object out)
Subtracts a value by all elements of the given array
|
static java.lang.Object |
subtract(java.lang.Object array,
java.lang.Number value)
Subtracts a value to all elements of the given array
|
static java.lang.Object |
subtract(java.lang.Object array,
java.lang.Number value,
java.lang.Object out)
Subtracts a value to all elements of the given array
|
static java.lang.Object |
subtract(java.lang.Object a1,
java.lang.Object a2)
Element-wise subtraction of two arrays
|
static java.lang.Object |
subtract(java.lang.Object a1,
java.lang.Object a2,
java.lang.Object out)
Element-wise subtraction of two arrays
|
static short[] |
subtract(short[] array,
short value)
Subtracts a value to all elements of the given short array
|
static short[] |
subtract(short[] a1,
short[] a2)
Element-wise subtraction of two short arrays
|
static short[] |
subtract(short[] a1,
short[] a2,
short[] out)
Element-wise subtraction of two short arrays (result in output if defined)
|
static short[] |
subtract(short[] array,
short value,
short[] out)
Subtracts a value to all elements of the given short array
|
static short[] |
subtract(short value,
short[] array)
Subtracts a value by all elements of the given short array
|
static short[] |
subtract(short value,
short[] array,
short[] out)
Subtracts a value by all elements of the given short array
|
static double |
sum(byte[] input,
boolean signed)
Computes the sum of all values in the input array
|
static double |
sum(double[] input)
Computes the sum of all values in the input array
|
static double |
sum(float[] input)
Computes the sum of all values in the input array
|
static double |
sum(int[] input,
boolean signed)
Computes the sum of all values in the input array
|
static double |
sum(long[] input,
boolean signed)
Computes the sum of all values in the input array
|
static double |
sum(java.lang.Object array,
boolean signed)
Computes the sum of all values from the specified input array.
|
static double |
sum(short[] input,
boolean signed)
Computes the sum of all values in the input array
|
static double |
var(double[] input,
boolean unbiased)
Computes the unbiased variance of the given array
|
public ArrayMath()
public static java.lang.Object add(java.lang.Object a1, java.lang.Object a2, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object add(java.lang.Object a1, java.lang.Object a2)
public static double[] add(double[] a1, double[] a2, double[] out)
out
- the array receiving the resultpublic static double[] add(double[] a1, double[] a2)
public static float[] add(float[] a1, float[] a2, float[] out)
out
- the array receiving the resultpublic static float[] add(float[] a1, float[] a2)
public static long[] add(long[] a1, long[] a2, long[] out)
out
- the array receiving the resultpublic static long[] add(long[] a1, long[] a2)
public static int[] add(int[] a1, int[] a2, int[] out)
out
- the array receiving the resultpublic static int[] add(int[] a1, int[] a2)
public static short[] add(short[] a1, short[] a2, short[] out)
out
- the array receiving the resultpublic static short[] add(short[] a1, short[] a2)
public static byte[] add(byte[] a1, byte[] a2, byte[] out)
out
- the array receiving the resultpublic static byte[] add(byte[] a1, byte[] a2)
public static java.lang.Object add(java.lang.Object array, java.lang.Number value, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object add(java.lang.Object array, java.lang.Number value)
public static double[] add(double[] array, double value, double[] out)
out
- the array receiving the result@Deprecated public static double[] add(double value, double[] array, double[] out)
add(double[] , double , double[])
insteadpublic static double[] add(double[] array, double value)
public static float[] add(float[] array, float value, float[] out)
out
- the array receiving the resultpublic static float[] add(float[] array, float value)
public static long[] add(long[] array, long value, long[] out)
out
- the array receiving the resultpublic static long[] add(long[] array, long value)
public static int[] add(int[] array, int value, int[] out)
out
- the array receiving the resultpublic static int[] add(int[] array, int value)
public static short[] add(short[] array, short value, short[] out)
out
- the array receiving the resultpublic static short[] add(short[] array, short value)
public static byte[] add(byte[] array, byte value, byte[] out)
out
- the array receiving the resultpublic static byte[] add(byte[] array, byte value)
public static java.lang.Object subtract(java.lang.Object a1, java.lang.Object a2, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object subtract(java.lang.Object a1, java.lang.Object a2)
public static double[] subtract(double[] a1, double[] a2, double[] out)
out
- the array receiving the resultpublic static double[] subtract(double[] a1, double[] a2)
public static float[] subtract(float[] a1, float[] a2, float[] out)
out
- the array receiving the resultpublic static float[] subtract(float[] a1, float[] a2)
public static long[] subtract(long[] a1, long[] a2, long[] out)
out
- the array receiving the resultpublic static long[] subtract(long[] a1, long[] a2)
public static int[] subtract(int[] a1, int[] a2, int[] out)
out
- the array receiving the resultpublic static int[] subtract(int[] a1, int[] a2)
public static short[] subtract(short[] a1, short[] a2, short[] out)
out
- the array receiving the resultpublic static short[] subtract(short[] a1, short[] a2)
public static byte[] subtract(byte[] a1, byte[] a2, byte[] out)
out
- the array receiving the resultpublic static byte[] subtract(byte[] a1, byte[] a2)
public static java.lang.Object subtract(java.lang.Object array, java.lang.Number value, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object subtract(java.lang.Object array, java.lang.Number value)
public static double[] subtract(double[] array, double value, double[] out)
out
- the array receiving the resultpublic static double[] subtract(double[] array, double value)
public static float[] subtract(float[] array, float value, float[] out)
out
- the array receiving the resultpublic static float[] subtract(float[] array, float value)
public static long[] subtract(long[] array, long value, long[] out)
out
- the array receiving the resultpublic static long[] subtract(long[] array, long value)
public static int[] subtract(int[] array, int value, int[] out)
out
- the array receiving the resultpublic static int[] subtract(int[] array, int value)
public static short[] subtract(short[] array, short value, short[] out)
out
- the array receiving the resultpublic static short[] subtract(short[] array, short value)
public static byte[] subtract(byte[] array, byte value, byte[] out)
out
- the array receiving the resultpublic static byte[] subtract(byte[] array, byte value)
public static java.lang.Object subtract(java.lang.Number value, java.lang.Object array, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object subtract(java.lang.Number value, java.lang.Object array)
public static double[] subtract(double value, double[] array, double[] out)
out
- the array receiving the resultpublic static double[] subtract(double value, double[] array)
public static float[] subtract(float value, float[] array, float[] out)
out
- the array receiving the resultpublic static float[] subtract(float value, float[] array)
public static long[] subtract(long value, long[] array, long[] out)
out
- the array receiving the resultpublic static long[] subtract(long value, long[] array)
public static int[] subtract(int value, int[] array, int[] out)
out
- the array receiving the resultpublic static int[] subtract(int value, int[] array)
public static short[] subtract(short value, short[] array, short[] out)
out
- the array receiving the resultpublic static short[] subtract(short value, short[] array)
public static byte[] subtract(byte value, byte[] array, byte[] out)
out
- the array receiving the resultpublic static byte[] subtract(byte value, byte[] array)
public static java.lang.Object multiply(java.lang.Object a1, java.lang.Object a2, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object multiply(java.lang.Object a1, java.lang.Object a2)
public static double[] multiply(double[] a1, double[] a2, double[] out)
out
- the array receiving the resultpublic static double[] multiply(double[] a1, double[] a2)
public static float[] multiply(float[] a1, float[] a2, float[] out)
out
- the array receiving the resultpublic static float[] multiply(float[] a1, float[] a2)
public static long[] multiply(long[] a1, long[] a2, long[] out)
out
- the array receiving the resultpublic static long[] multiply(long[] a1, long[] a2)
public static int[] multiply(int[] a1, int[] a2, int[] out)
out
- the array receiving the resultpublic static int[] multiply(int[] a1, int[] a2)
public static short[] multiply(short[] a1, short[] a2, short[] out)
out
- the array receiving the resultpublic static short[] multiply(short[] a1, short[] a2)
public static byte[] multiply(byte[] a1, byte[] a2, byte[] out)
out
- the array receiving the resultpublic static byte[] multiply(byte[] a1, byte[] a2)
public static java.lang.Object multiply(java.lang.Object array, java.lang.Number value, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object multiply(java.lang.Object array, java.lang.Number value)
public static double[] multiply(double[] array, double value, double[] out)
out
- the array receiving the result@Deprecated public static double[] multiply(double value, double[] array, double[] out)
multiply(double[] , double , double[])
insteadpublic static double[] multiply(double[] array, double value)
public static float[] multiply(float[] array, float value, float[] out)
out
- the array receiving the resultpublic static float[] multiply(float[] array, float value)
public static long[] multiply(long[] array, long value, long[] out)
out
- the array receiving the resultpublic static long[] multiply(long[] array, long value)
public static int[] multiply(int[] array, int value, int[] out)
out
- the array receiving the resultpublic static int[] multiply(int[] array, int value)
public static short[] multiply(short[] array, short value, short[] out)
out
- the array receiving the resultpublic static short[] multiply(short[] array, short value)
public static byte[] multiply(byte[] array, byte value, byte[] out)
out
- the array receiving the resultpublic static byte[] multiply(byte[] array, byte value)
public static java.lang.Object divide(java.lang.Object a1, java.lang.Object a2, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object divide(java.lang.Object a1, java.lang.Object a2)
public static double[] divide(double[] a1, double[] a2, double[] out)
out
- the array receiving the resultpublic static double[] divide(double[] a1, double[] a2)
public static float[] divide(float[] a1, float[] a2, float[] out)
out
- the array receiving the resultpublic static float[] divide(float[] a1, float[] a2)
public static long[] divide(long[] a1, long[] a2, long[] out)
out
- the array receiving the resultpublic static long[] divide(long[] a1, long[] a2)
public static int[] divide(int[] a1, int[] a2, int[] out)
out
- the array receiving the resultpublic static int[] divide(int[] a1, int[] a2)
public static short[] divide(short[] a1, short[] a2, short[] out)
out
- the array receiving the resultpublic static short[] divide(short[] a1, short[] a2)
public static byte[] divide(byte[] a1, byte[] a2, byte[] out)
out
- the array receiving the resultpublic static byte[] divide(byte[] a1, byte[] a2)
public static java.lang.Object divide(java.lang.Object array, java.lang.Number value, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object divide(java.lang.Object array, java.lang.Number value)
public static double[] divide(double[] array, double value, double[] out)
out
- the array receiving the resultpublic static double[] divide(double[] array, double value)
public static float[] divide(float[] array, float value, float[] out)
out
- the array receiving the resultpublic static float[] divide(float[] array, float value)
public static long[] divide(long[] array, long value, long[] out)
out
- the array receiving the resultpublic static long[] divide(long[] array, long value)
public static int[] divide(int[] array, int value, int[] out)
out
- the array receiving the resultpublic static int[] divide(int[] array, int value)
public static short[] divide(short[] array, short value, short[] out)
out
- the array receiving the resultpublic static short[] divide(short[] array, short value)
public static byte[] divide(byte[] array, byte value, byte[] out)
out
- the array receiving the resultpublic static byte[] divide(byte[] array, byte value)
public static java.lang.Object divide(java.lang.Number value, java.lang.Object array, java.lang.Object out)
out
- the array receiving the resultpublic static java.lang.Object divide(java.lang.Number value, java.lang.Object array)
public static double[] divide(double value, double[] array, double[] out)
out
- the array receiving the resultpublic static double[] divide(double value, double[] array)
public static float[] divide(float value, float[] array, float[] out)
out
- the array receiving the resultpublic static float[] divide(float value, float[] array)
public static long[] divide(long value, long[] array, long[] out)
out
- the array receiving the resultpublic static long[] divide(long value, long[] array)
public static int[] divide(int value, int[] array, int[] out)
out
- the array receiving the resultpublic static int[] divide(int value, int[] array)
public static short[] divide(short value, short[] array, short[] out)
out
- the array receiving the resultpublic static short[] divide(short value, short[] array)
public static byte[] divide(byte value, byte[] array, byte[] out)
out
- the array receiving the resultpublic static byte[] divide(byte value, byte[] array)
public static java.lang.Object abs(java.lang.Object array, boolean overwrite)
overwrite
- true : overwrites the input datapublic static double[] abs(double[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static float[] abs(float[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static long[] abs(long[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static int[] abs(int[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static short[] abs(short[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static byte[] abs(byte[] input, boolean overwrite)
overwrite
- true overwrites the input data, false returns the result in a new structurepublic static double min(java.lang.Object array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static int min(byte[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static int min(short[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static long min(int[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static long min(long[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static float min(float[] array)
array
- an arraypublic static double min(double[] array)
array
- an arraypublic static double max(java.lang.Object array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static int max(byte[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static int max(short[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static long max(int[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static long max(long[] array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static float max(float[] array)
array
- an arraypublic static double max(double[] array)
array
- an arraypublic static void min(double[] a1, double[] a2, double[] output)
a1
- =input1a2
- =input2output
- - the array of min valuespublic static double[] min(double[] a1, double[] a2)
a1
- =input1a2
- =input2public static void max(double[] a1, double[] a2, double[] output)
a1
- =input1a2
- =input2output
- - the array of max valuespublic static double[] max(double[] a1, double[] a2)
a1
- =input1a2
- =input2public static double median(double[] input, boolean preserveData)
input
- preserveData
- set to true if the given array should not be changed (a copy will be made)public static double mad(double[] input, boolean normalPopulation)
input
- normalPopulation
- normalizes the population by 1.4826public static double select(int k, double[] data)
k
- data
- public static double sum(java.lang.Object array, boolean signed)
array
- an arraysigned
- signed / unsigned flagpublic static double sum(byte[] input, boolean signed)
input
- the array to sum upsigned
- signed / unsigned flagpublic static double sum(short[] input, boolean signed)
input
- the array to sum upsigned
- signed / unsigned flagpublic static double sum(int[] input, boolean signed)
input
- the array to sum upsigned
- signed / unsigned flagpublic static double sum(long[] input, boolean signed)
input
- the array to sum upsigned
- signed / unsigned flagpublic static double sum(float[] input)
input
- the array to sum uppublic static double sum(double[] input)
input
- the array to sum uppublic static double mean(double[] input)
input
- public static double var(double[] input, boolean unbiased)
input
- unbiased
- set to true if the result should be normalized by the population size minus 1public static double std(double[] input, boolean unbiased)
input
- unbiased
- set to true if the variance should be unbiasedpublic static double[] rescale(double[] input, double newMin, double newMax, boolean overwrite)
input
- the input arraynewMin
- the new min boundnewMax
- the new max boundoverwrite
- true overwrites the input data, false returns the result in a new structurepublic static double[] standardize(double[] input, boolean overwrite)
input
- the data to standardizeoverwrite
- true if the output should overwrite the input, false if a new array should be returnedpublic static double correlation(double[] a, double[] b) throws java.lang.IllegalArgumentException
sum(a[i] * b[i]) r(a,b) = ------------------------------------------- sqrt( sum(a[i] * a[i]) * sum(b[i] * b[i]) )
a
- a populationb
- a populationjava.lang.IllegalArgumentException
- if the two input population have different sizespublic static double correlationPearson(double[] a, double[] b) throws java.lang.IllegalArgumentException
sum(a[i] * b[i]) - N * mean(a) * mean(b) r(a,b) = ---------------------------------------- (N-1) * std(a) * std(b)
a
- a populationb
- a populationjava.lang.IllegalArgumentException
- if the two input population have different sizes